diff options
author | Jay Pignata <john.pignata@gmail.com> | 2009-08-30 19:51:13 -0400 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-08-30 17:01:59 -0700 |
commit | 57f7308da4dff57639f8e67a830baab358aaa5df (patch) | |
tree | 11f77a41878f940b25a96b7d6f0671c50c18c899 | |
parent | cf4846c6ae991143afaef987a63c3ad9a3a2546b (diff) | |
download | rails-57f7308da4dff57639f8e67a830baab358aaa5df.tar.gz rails-57f7308da4dff57639f8e67a830baab358aaa5df.tar.bz2 rails-57f7308da4dff57639f8e67a830baab358aaa5df.zip |
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>
-rw-r--r-- | railties/lib/rails/plugin/loader.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |