Class: SerialChronology
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- SerialChronology
- Includes:
- Housekeeping::Timestamps, Housekeeping::Users, Shared::IsData, Shared::SharedAcrossProjects
- Defined in:
- app/models/serial_chronology.rb
Overview
Stores the chronological relationship between two serials.
Direct Known Subclasses
Defined Under Namespace
Classes: SerialMerge, SerialSequence
Instance Attribute Summary collapse
-
#preceding_serial_id ⇒ Integer
The reference/historical serial.
-
#succeeding_serial_id ⇒ Integer
The “new” serial.
-
#type ⇒ String
The type of transition b/w the old and new.
Attributes included from Housekeeping::Users
Method Summary
Methods included from Shared::IsData
#errors_excepting, #full_error_messages_excepting, #identical, #is_community?, #is_destroyable?, #is_editable?, #is_in_use?, #is_in_users_projects?, #metamorphosize, #similar
Methods included from Housekeeping::Users
#set_created_by_id, #set_updated_by_id
Methods inherited from ApplicationRecord
Instance Attribute Details
#preceding_serial_id ⇒ Integer
Returns the reference/historical serial.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/models/serial_chronology.rb', line 15 class SerialChronology < ApplicationRecord include Housekeeping::Users include Housekeeping::Timestamps include Shared::IsData include Shared::SharedAcrossProjects belongs_to :preceding_serial, class_name: 'Serial', foreign_key: :preceding_serial_id, inverse_of: :preceding_serial_chronologies belongs_to :succeeding_serial, class_name: 'Serial', foreign_key: :succeeding_serial_id, inverse_of: :succeeding_serial_chronologies validates_presence_of :preceding_serial_id, :succeeding_serial_id, :type end |
#succeeding_serial_id ⇒ Integer
Returns the “new” serial.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/models/serial_chronology.rb', line 15 class SerialChronology < ApplicationRecord include Housekeeping::Users include Housekeeping::Timestamps include Shared::IsData include Shared::SharedAcrossProjects belongs_to :preceding_serial, class_name: 'Serial', foreign_key: :preceding_serial_id, inverse_of: :preceding_serial_chronologies belongs_to :succeeding_serial, class_name: 'Serial', foreign_key: :succeeding_serial_id, inverse_of: :succeeding_serial_chronologies validates_presence_of :preceding_serial_id, :succeeding_serial_id, :type end |
#type ⇒ String
Returns the type of transition b/w the old and new.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/models/serial_chronology.rb', line 15 class SerialChronology < ApplicationRecord include Housekeeping::Users include Housekeeping::Timestamps include Shared::IsData include Shared::SharedAcrossProjects belongs_to :preceding_serial, class_name: 'Serial', foreign_key: :preceding_serial_id, inverse_of: :preceding_serial_chronologies belongs_to :succeeding_serial, class_name: 'Serial', foreign_key: :succeeding_serial_id, inverse_of: :succeeding_serial_chronologies validates_presence_of :preceding_serial_id, :succeeding_serial_id, :type end |