From 57f7308da4dff57639f8e67a830baab358aaa5df Mon Sep 17 00:00:00 2001 From: Jay Pignata Date: Sun, 30 Aug 2009 19:51:13 -0400 Subject: [PATCH] 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 --- railties/lib/rails/plugin/loader.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/lib/rails/plugin/loader.rb b/railties/lib/rails/plugin/loader.rb index 9e2c3c7b03..0d16cbd7c3 100644 --- a/railties/lib/rails/plugin/loader.rb +++ b/railties/lib/rails/plugin/loader.rb @@ -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