Class: Proposal

Inherits:
ApplicationRecord show all
Includes:
AlgoliaSearch, Interestable, Membership, RelationHelpers, Ressourceable, Skillable
Defined in:
app/models/proposal.rb

Overview

Application of a Project to a PeerReview.

Instance Method Summary collapse

Methods included from Skillable

#update_skills

Methods included from Ressourceable

#update_ressources

Methods included from RelationHelpers

#clappers, #claps_count, #followers, #followers_count, #reviews_count, #saves_count

Methods included from Membership

#admins, #all_owners_admins_members, #has_privacy?, #members, #members_count, #owners, #pending_members, #user_is_member?, #users, #users_sm

Methods included from Interestable

#update_interests

Instance Method Details

METHODS ##



28
29
30
31
32
# File 'app/models/proposal.rb', line 28

def frontend_link
  link = short_title.nil? ? id : short_title

  "/proposal/#{link}"
end

#peer_reviewObject

FIELDS ##



19
# File 'app/models/proposal.rb', line 19

belongs_to :peer_review

#peer_review_idObject

VALIDATIONS ##



25
# File 'app/models/proposal.rb', line 25

validates :peer_review_id, uniqueness: { scope: :project_id }

#submitted?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'app/models/proposal.rb', line 34

def 
  .present?
end