module Ddr::Models::Relation
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.
Public Instance Methods
having_local_id(local_id)
click to toggle source
# File lib/ddr/models/relation.rb, line 8 def having_local_id(local_id) where(Ddr::Index::Fields::LOCAL_ID => local_id) end
in_collection(coll)
click to toggle source
# File lib/ddr/models/relation.rb, line 12 def in_collection(coll) where(Ddr::Index::Fields::IS_MEMBER_OF_COLLECTION => coll.respond_to?(:id) ? coll.id : coll) end