1
0
Fork 0
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:
Jay Pignata 2009-08-30 19:51:13 -04:00 committed by Jeremy Kemper
parent cf4846c6ae
commit 57f7308da4

View file

@ -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