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

14 lines
287 B
Ruby

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