Skip to content

Commit

Permalink
wings: bootstrap DefaultWork with CoreMetadata
Browse files Browse the repository at this point in the history
use `CoreMetadata` in generated Work types.

Hyrax may depend on this metadata being setup in a particular way, so we should
use the implementation it relies on, not a generated one.
  • Loading branch information
tamsin johnson authored and tamsin johnson committed Aug 21, 2023
1 parent ff6bb7d commit cbe9278
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/wings/active_fedora_converter/default_work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def initialize(key)
#
# @return [void] apply the property
def apply(klass)
return if klass.properties.keys.include?(name) ||
return if klass.properties.keys.include?(name.to_s) ||
klass.protected_property_name?(name)
klass.send(definition_method, name, options)
end
Expand Down Expand Up @@ -98,6 +98,7 @@ class DefaultWork < ActiveFedora::Base
include Hyrax::Noid
include Hyrax::Permissions
include Hydra::AccessControls::Embargoable
include Hyrax::CoreMetadata
property :nested_resource, predicate: ::RDF::URI("http://example.com/nested_resource"), class_name: "Wings::ActiveFedoraConverter::NestedResource"

validates :lease_expiration_date, 'hydra/future_date': true, on: :create
Expand Down

0 comments on commit cbe9278

Please sign in to comment.