Class: Spina::Admin::Journal::Issue

Inherits:
ApplicationRecord
  • Object
show all
Includes:
AttrJson::NestedAttributes, AttrJson::Record, Partable, TranslatedContent
Defined in:
app/models/spina/admin/journal/issue.rb

Overview

Record for an issue of a journal. Belongs to a particular volume of a journal. Has many articles.

Validators

Presence

#number, #date

Uniqueness

#number (scope: volume)

Scopes

sorted_asc

sorted in order of increasing number

sorted_desc

sorted highest number first

See Also:

Instance Attribute Summary collapse

Instance Attribute Details

#dateDate

Returns The (planned) publication date of the issue.

Returns:

  • (Date)

    The (planned) publication date of the issue.



32
# File 'app/models/spina/admin/journal/issue.rb', line 32

belongs_to :volume

#issueActiveRecord::Relation

Returns the articles within this issue.

Returns:

  • (ActiveRecord::Relation)

    the articles within this issue



36
# File 'app/models/spina/admin/journal/issue.rb', line 36

has_many :articles, dependent: :destroy

#numberInteger

Returns The number.

Returns:

  • (Integer)

    The number



32
# File 'app/models/spina/admin/journal/issue.rb', line 32

belongs_to :volume

#titleString

Returns The title of the issue (optional).

Returns:

  • (String)

    The title of the issue (optional)



32
# File 'app/models/spina/admin/journal/issue.rb', line 32

belongs_to :volume

#volumeActiveRecord::Relation

Returns the volume that contains this issue.

Returns:

  • (ActiveRecord::Relation)

    the volume that contains this issue



32
# File 'app/models/spina/admin/journal/issue.rb', line 32

belongs_to :volume