diff options
-rw-r--r-- | actionpack/lib/abstract_controller/details_cache.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/actionpack/lib/abstract_controller/details_cache.rb b/actionpack/lib/abstract_controller/details_cache.rb index 5b87b41e7d..be1a1c0f34 100644 --- a/actionpack/lib/abstract_controller/details_cache.rb +++ b/actionpack/lib/abstract_controller/details_cache.rb @@ -34,7 +34,7 @@ module AbstractController end def render_to_body(*args) - Thread.current[:format_locale_key] = HashKey.get(self.class, _details_defaults) + Thread.current[:format_locale_key] = HashKey.get(self.class, details_for_render) super end diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 32fdf821a7..2ea4f02871 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -168,12 +168,12 @@ module AbstractController end end - def _details_defaults + def details_for_render { :formats => formats, :locale => [I18n.locale] } end def _normalize_details(options) - details = _details_defaults + details = details_for_render details[:formats] = Array(options[:format]) if options[:format] details[:locale] = Array(options[:locale]) if options[:locale] details diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index 6e5379745b..00a09309bf 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -27,10 +27,6 @@ module ActionController super end - def details_for_render - {:formats => formats} - end - def format_for_text formats.first end |