mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04: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:
committed by
Jeremy Kemper
parent
cf4846c6ae
commit
57f7308da4
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user