5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 20:16:22 +00:00

todos los archivos subidos se asocian al sitio

This commit is contained in:
f 2022-03-05 20:09:37 -03:00
parent 7f6063475b
commit 10eef47ce8

View file

@ -0,0 +1,19 @@
# frozen_string_literal: true
module ActiveStorage
module Attached::Changes::CreateOneDecorator
extend ActiveSupport::Concern
included do
private
# A partir de ahora todos los archivos se suben al servicio de
# cada sitio.
def attachment_service_name
record.name.to_sym
end
end
end
end
ActiveStorage::Attached::Changes::CreateOne.include ActiveStorage::Attached::Changes::CreateOneDecorator