aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJuan Barreneche <snipperme@gmail.com>2013-03-14 18:02:20 -0300
committerJuan Barreneche <snipperme@gmail.com>2013-03-14 18:02:20 -0300
commitce755697fc926b7fa5c783a27ca814574045c961 (patch)
tree276b32e41b91871da8a86dbf85ae83608cd09ddd /actionpack/lib
parent3d4d7420ae43a35ae01343ced6d7c685d0b667ee (diff)
downloadrails-ce755697fc926b7fa5c783a27ca814574045c961.tar.gz
rails-ce755697fc926b7fa5c783a27ca814574045c961.tar.bz2
rails-ce755697fc926b7fa5c783a27ca814574045c961.zip
Extract hardcoded lists to Redo::RestaurantsList
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/lookup_context.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/lookup_context.rb b/actionpack/lib/action_view/lookup_context.rb
index 33b508e9b5..9f617a9a53 100644
--- a/actionpack/lib/action_view/lookup_context.rb
+++ b/actionpack/lib/action_view/lookup_context.rb
@@ -44,7 +44,13 @@ module ActionView
module Accessors #:nodoc:
end
- register_detail(:locale) { [I18n.locale, I18n.default_locale].uniq }
+ register_detail(:locale) do
+ locales = [I18n.locale]
+ locales.concat(I18n.fallbacks[I18n.locale]) if I18n.respond_to? :fallbacks
+ locales << I18n.default_locale
+ locales.uniq!
+ locales
+ end
register_detail(:formats) { Mime::SET.symbols }
register_detail(:handlers){ Template::Handlers.extensions }