app/repository_models/curation_concern/model.rb in curate-0.1.2 vs app/repository_models/curation_concern/model.rb in curate-0.1.3

- old
+ new

@@ -1,22 +1,29 @@ module CurationConcern module Model extend ActiveSupport::Concern + module ClassMethods + def human_readable_type + name.demodulize.titleize + end + end + included do include Hydra::ModelMixins::CommonMetadata include Sufia::ModelMethods include Sufia::Noid include Sufia::GenericFile::Permissions + extend ClassMethods has_metadata name: "properties", type: PropertiesDatastream, control_group: 'M' delegate_to :properties, [:relative_path, :depositor], unique: true delegate_to :descMetadata, [:archived_object_type], unique: true before_save :set_archived_object_type end def human_readable_type - self.class.to_s.demodulize.titleize + self.class.human_readable_type end def set_archived_object_type self.archived_object_type = human_readable_type end