Sha256: 1c5f9aebeff1e8487d925d5e2942f2766099c3b6b141b0cb548345504cbabbaa
Contents?: true
Size: 641 Bytes
Versions: 7
Compression:
Stored size: 641 Bytes
Contents
# # An Item is a member of a Collection -- i.e., a "work" -- the principal describable resource. # # Examples: photograph, book, article, sound recording, video, etc. # class Item < Ddr::Models::Base include Ddr::Models::HasChildren include Ddr::Models::HasStructMetadata has_many :children, predicate: ActiveFedora::RDF::Fcrepo::RelsExt.isPartOf, class_name: "Component", as: :parent belongs_to :parent, predicate: ActiveFedora::RDF::Fcrepo::RelsExt.isMemberOfCollection, class_name: "Collection" def publishable? parent.present? && parent.published? end end
Version data entries
7 entries across 7 versions & 1 rubygems