Permalink
Browse files

Merge _details_defaults and details_for_render

  • Loading branch information...
1 parent 8b5b241 commit 300d6b549d020cbfaa10657f07a22ec892d8078f Carlhuda committed Mar 1, 2010
@@ -34,7 +34,7 @@ def template_cache
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
@@ -168,12 +168,12 @@ def _determine_template(options)
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
@@ -27,10 +27,6 @@ def _render_partial(options)
super
end
- def details_for_render
- {:formats => formats}
- end
-
def format_for_text
formats.first
end

0 comments on commit 300d6b5

Please sign in to comment.