app/models/concerns/cul/scv/hydra/models/resource.rb in cul_scv_hydra-0.12.0 vs app/models/concerns/cul/scv/hydra/models/resource.rb in cul_scv_hydra-0.12.1

- old
+ new

@@ -1,7 +1,6 @@ -module Cul::Scv::Hydra::Models -module Resource +module Cul::Scv::Hydra::Models::Resource extend ActiveSupport::Concern # constants # IMAGE_MIME_TYPES = [ 'image/bmp', 'image/gif', @@ -24,12 +23,12 @@ class_eval %Q{ def #{x} return relationships[:#{y.to_s}] } } - - after_create :resource! + + after_create :resource! end if self.respond_to? :has_datastream has_datastream :name => "CONTENT", :type=>::ActiveFedora::Datastream, :versionable => true end end @@ -83,7 +82,6 @@ # @return [String] mimeType for filename passed in. Default: application/octet-stream if mimeType cannot be determined def mime_type file_name mime_types = MIME::Types.of(file_name) mime_type = mime_types.empty? ? "application/octet-stream" : mime_types.first.content_type end -end end