Skip to content

Commit

Permalink
Switch to using the Fcrepo predicate for has_model
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Dec 1, 2014
1 parent 5ff8c6b commit 1d51257
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/active_fedora/fedora_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module FedoraAttributes
include RDF::Indexing
include ActiveTriples::Properties
include ActiveTriples::Reflection
delegate :rdf_subject, :get_values, to: :resource
delegate :rdf_subject, :get_values, to: :resource

property :has_model, predicate: ::RDF::URI.new("http://fedora.info/definitions/v4/rels-ext#hasModel")
property :has_model, predicate: ActiveFedora::RDF::Fcrepo::Model.hasModel
property :create_date, predicate: ActiveFedora::RDF::Fcrepo4.created
property :modified_date, predicate: ActiveFedora::RDF::Fcrepo4.lastModified

Expand Down
2 changes: 1 addition & 1 deletion lib/active_fedora/relation/finder_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def class_to_load(resource, cast)

# TODO just use has_model
def has_model_value(resource)
Ldp::Orm.new(resource).value(::RDF::URI.new("http://fedora.info/definitions/v4/rels-ext#hasModel")).first.to_s
Ldp::Orm.new(resource).value(ActiveFedora::RDF::Fcrepo::Model.hasModel).first.to_s
end

def find_with_ids(ids, cast)
Expand Down

0 comments on commit 1d51257

Please sign in to comment.