initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
ActiveSupport.on_load(:active_storage_attachment) do
|
||||
attribute :uuid, :string, default: -> { SecureRandom.uuid }
|
||||
|
||||
has_many_attached :preview_images
|
||||
end
|
||||
|
||||
Rails.configuration.to_prepare do
|
||||
ActiveStorage::DiskController.after_action do
|
||||
response.set_header('Cache-Control', 'public, max-age=31536000') if action_name == 'show'
|
||||
end
|
||||
|
||||
LoadActiveStorageConfigs.call
|
||||
rescue StandardError
|
||||
nil
|
||||
end
|
||||
Reference in New Issue
Block a user