Skip to content

Commit

Permalink
Fixed i18n override problem with rails 4
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagofm committed Nov 10, 2013
1 parent a5cc1c0 commit 21e0d27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lib/carrierwave.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ class Railtie < Rails::Railtie
require 'carrierwave/orm/activerecord'
end
end

##
# Loads the Carrierwave locale files before the Rails application locales
# letting the Rails application overrite the carrierwave locale defaults
config.before_configuration do
I18n.load_path << File.join(File.dirname(__FILE__), "carrierwave", "locale", 'en.yml')
end
end
end

Expand Down
2 changes: 0 additions & 2 deletions lib/carrierwave/validations/active_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,3 @@ def validates_download_of(*attr_names)
end
end
end

I18n.load_path << File.join(File.dirname(__FILE__), "..", "locale", 'en.yml')

0 comments on commit 21e0d27

Please sign in to comment.