Skip to content

Commit

Permalink
available_locales can be a Symbol. Fixes #2234
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Oct 3, 2017
1 parent 63b9396 commit 796ddb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/carrierwave.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Railtie < Rails::Railtie
initializer "carrierwave.setup_paths" do |app|
CarrierWave.root = Rails.root.join(Rails.public_path).to_s
CarrierWave.base_path = ENV['RAILS_RELATIVE_URL_ROOT']
available_locales = app.config.i18n.available_locales
available_locales = Array(app.config.i18n.available_locales || [])
if available_locales.blank? || available_locales.include?(:en)
I18n.load_path.prepend(File.join(File.dirname(__FILE__), 'carrierwave', 'locale', "en.yml"))
end
Expand Down

1 comment on commit 796ddb0

@MateoLa
Copy link

@MateoLa MateoLa commented on 796ddb0 Oct 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change works. Thank you M. Shibuya.

Please sign in to comment.