Class: Spina::Admin::Journal::Authorship
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Spina::Admin::Journal::Authorship
- Defined in:
- app/models/spina/admin/journal/authorship.rb
Overview
Joins Articles and Affiliations
Instance Attribute Summary collapse
-
#article ⇒ ActiveRecord::Relation
The associated article.
-
#author_name ⇒ ActiveRecord::Relation
The associated affiliation of an author of the article.
-
#position ⇒ Integer
Used to order the affiliations for each article.
Instance Attribute Details
#article ⇒ ActiveRecord::Relation
Returns the associated article.
12 |
# File 'app/models/spina/admin/journal/authorship.rb', line 12 belongs_to :article |
#author_name ⇒ ActiveRecord::Relation
Returns the associated affiliation of an author of the article.
15 |
# File 'app/models/spina/admin/journal/authorship.rb', line 15 belongs_to :affiliation |
#position ⇒ Integer
Returns used to order the affiliations for each article.
19 |
# File 'app/models/spina/admin/journal/authorship.rb', line 19 validates :position, presence: true, uniqueness: { scope: :article_id } |