Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
fix: add folder to active_storage files
Browse files Browse the repository at this point in the history
  • Loading branch information
leio10 committed Jul 7, 2021
1 parent 8518667 commit f4757f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 9 additions & 0 deletions config/initializers/active_storage.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

if ENV["HEROKU_APP_NAME"].present?
ActiveSupport.on_load(:active_storage_blob) do
def key
self[:key] ||= "#{Decidim.base_uploads_path}#{self.class.generate_unique_secure_token}"
end
end
end
1 change: 0 additions & 1 deletion config/initializers/decidim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,3 @@

Rails.application.config.i18n.available_locales = Decidim.available_locales
Rails.application.config.i18n.default_locale = Decidim.default_locale

0 comments on commit f4757f5

Please sign in to comment.