Sha256: 251880c2393c509b4b8ce43cd7b40d20cadd1cdb793b677e13d76e107f750b5f
Contents?: true
Size: 504 Bytes
Versions: 18
Compression:
Stored size: 504 Bytes
Contents
module Ddr::Models # # Since ActiveFedora does not yet (as of at least v9.9.1) # have named scopes, this module extends Base and is # included in AF::Relation for chainability. # module Relation def having_local_id(local_id) where(Ddr::Index::Fields::LOCAL_ID => local_id) end def in_collection(coll) where(Ddr::Index::Fields::IS_MEMBER_OF_COLLECTION => coll.respond_to?(:id) ? coll.id : coll) end end end ActiveFedora::Relation.include(Ddr::Models::Relation)
Version data entries
18 entries across 18 versions & 1 rubygems