diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-13 10:07:02 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-13 10:07:02 +0100 |
commit | 1f5b9bbdb377c1b0e29650a103bf53526ceefdd5 (patch) | |
tree | b330d0a59a93cd128d6199725708a025c4692398 /activesupport/lib/active_support/i18n_railtie.rb | |
parent | 693d2be82706d7dc40af6860a26330c49c27f151 (diff) | |
download | rails-1f5b9bbdb377c1b0e29650a103bf53526ceefdd5.tar.gz rails-1f5b9bbdb377c1b0e29650a103bf53526ceefdd5.tar.bz2 rails-1f5b9bbdb377c1b0e29650a103bf53526ceefdd5.zip |
Clean up FileUpdateChecker API.
Diffstat (limited to 'activesupport/lib/active_support/i18n_railtie.rb')
-rw-r--r-- | activesupport/lib/active_support/i18n_railtie.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/i18n_railtie.rb b/activesupport/lib/active_support/i18n_railtie.rb index a989ff8f57..ae3a39562c 100644 --- a/activesupport/lib/active_support/i18n_railtie.rb +++ b/activesupport/lib/active_support/i18n_railtie.rb @@ -10,7 +10,11 @@ module I18n config.i18n.fallbacks = ActiveSupport::OrderedOptions.new def self.reloader - @reloader ||= ActiveSupport::FileUpdateChecker.new([]){ I18n.reload! } + @reloader ||= ActiveSupport::FileUpdateChecker.new(reloader_paths){ I18n.reload! } + end + + def self.reloader_paths + @reloader_paths ||= [] end # Add <tt>I18n::Railtie.reloader</tt> to ActionDispatch callbacks. Since, at this @@ -59,7 +63,7 @@ module I18n init_fallbacks(fallbacks) if fallbacks && validate_fallbacks(fallbacks) - reloader.paths.concat I18n.load_path + reloader_paths.concat I18n.load_path reloader.execute_if_updated @i18n_inited = true |