rosa-build/app/models/concerns/empty_metadata.rb

14 lines
276 B
Ruby

module EmptyMetadata
extend ActiveSupport::Concern
included do
after_create :create_empty_metadata
end
def create_empty_metadata
return if is_a?(Platform) && ( personal? || hidden? )
Resque.enqueue(CreateEmptyMetadataJob, self.class.name, id)
end
end