Class: Proposal
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Proposal
- 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
-
#frontend_link ⇒ Object
METHODS ##.
-
#peer_review ⇒ Object
FIELDS ##.
-
#peer_review_id ⇒ Object
VALIDATIONS ##.
- #submitted? ⇒ Boolean
Methods included from Skillable
Methods included from Ressourceable
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
Instance Method Details
#frontend_link ⇒ Object
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_review ⇒ Object
FIELDS ##
19 |
# File 'app/models/proposal.rb', line 19 belongs_to :peer_review |
#peer_review_id ⇒ Object
VALIDATIONS ##
25 |
# File 'app/models/proposal.rb', line 25 validates :peer_review_id, uniqueness: { scope: :project_id } |
#submitted? ⇒ Boolean
34 35 36 |
# File 'app/models/proposal.rb', line 34 def submitted? submitted_at.present? end |