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 717efb5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion config/initializers/decidim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,14 @@

if ENV["HEROKU_APP_NAME"].present?
config.base_uploads_path = ENV["HEROKU_APP_NAME"] + "/"

ActiveSupport.on_load(:active_storage_blob) do
def key
self[:key] ||= "#{config.base_uploads_path}/#{self.class.generate_unique_secure_token}"
end
end
end
end

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

0 comments on commit 717efb5

Please sign in to comment.