2014-09-30 21:05:53 +01:00
|
|
|
module EmptyMetadata
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
after_create :create_empty_metadata
|
|
|
|
end
|
|
|
|
|
|
|
|
def create_empty_metadata
|
2014-10-01 21:10:05 +01:00
|
|
|
return if is_a?(Platform) && ( personal? || hidden? )
|
2014-09-30 21:05:53 +01:00
|
|
|
Resque.enqueue(CreateEmptyMetadataJob, self.class.name, id)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|