app/repository_models/generic_file.rb in curate-0.5.1 vs app/repository_models/generic_file.rb in curate-0.5.2

- old
+ new

@@ -11,22 +11,24 @@ include Sufia::GenericFile::Audit include Sufia::GenericFile::MimeTypes include Sufia::GenericFile::Thumbnail include Sufia::GenericFile::Derivatives + include CurationConcern::RemotelyIdentifiedByDoi::Attributes + belongs_to :batch, property: :is_part_of, class_name: 'ActiveFedora::Base' validates :batch, presence: true validates :file, presence: true, on: :create has_metadata "descMetadata", type: GenericFileRdfDatastream has_metadata 'properties', type: Curate::PropertiesDatastream has_file_datastream "content", type: FileContentDatastream has_file_datastream "thumbnail" - delegate_to :properties, [:owner, :depositor], multiple: false - delegate_to :descMetadata, [:date_uploaded, :date_modified], multiple: false - delegate_to :descMetadata, [:creator, :title], multiple: true + has_attributes :owner, :depositor, datastream: :properties, multiple: false + has_attributes :date_uploaded, :date_modified, datastream: :descMetadata, multiple: false + has_attributes :creator, :title, datastream: :descMetadata, multiple: true class_attribute :human_readable_short_description self.human_readable_short_description = "An arbitrary single file." attr_accessor :file, :version