Class: FindingAid
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- FindingAid
- Defined in:
- app/models/finding_aid.rb
Overview
An archival finding aid
This is a logical representation, which represents all versions of an EAD file regardless of changes in content
Instance Attribute Summary (collapse)
Belongs to (collapse)
Has many (collapse)
- - (ActiveRecord::Relation<FindingAidVersion>) finding_aid_versions
- - (ActiveRecord::Relation<Run>) runs
Instance Method Summary (collapse)
-
- (FindingAidVersion) current
Gets most recent version of this FindingAid.
Instance Attribute Details
- (DateTime) created_at
57 |
# File 'db/schema.rb', line 57 t.datetime "created_at" |
- (String) eadid
54 |
# File 'db/schema.rb', line 54 t.string "eadid", limit: 255, null: false |
- (DateTime) updated_at
58 |
# File 'db/schema.rb', line 58 t.datetime "updated_at" |
Instance Method Details
- (FindingAidVersion) current
Gets most recent version of this FindingAid
18 19 20 |
# File 'app/models/finding_aid.rb', line 18 def current finding_aid_versions.order(created_at: :desc).first end |
- (ActiveRecord::Relation<FindingAidVersion>) finding_aid_versions
7 |
# File 'app/models/finding_aid.rb', line 7 has_many :finding_aid_versions, dependent: :destroy |
- (ActiveRecord::Relation<Run>) runs
8 |
# File 'app/models/finding_aid.rb', line 8 has_many :runs, through: :finding_aid_versions |