mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Changing plugin loader to use blocks instead of Symbol#to_proc to ensure tests run without activesupport
[#3118 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
parent
cf4846c6ae
commit
57f7308da4
1 changed files with 3 additions and 1 deletions
|
@ -86,8 +86,10 @@ module Rails
|
|||
end
|
||||
|
||||
def add_engine_locales
|
||||
localized_engines = engines.select { |engine| engine.localized? }
|
||||
|
||||
# reverse it such that the last engine can overwrite translations from the first, like with routes
|
||||
locale_files = engines.select(&:localized?).collect(&:locale_files).reverse.flatten
|
||||
locale_files = localized_engines.collect { |engine| engine.locale_files }.reverse.flatten
|
||||
I18n.load_path += locale_files - I18n.load_path
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue