From 80074cb4de2e60cd771b76d396d61e5c4bc0aff6 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Tue, 15 May 2007 03:13:32 +0000 Subject: Assume that rendered partials go by the HTML format by default git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/base.rb | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 33c71407bb..183ed75d93 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -403,19 +403,7 @@ module ActionView #:nodoc: # symbolized version of the :format parameter of the request, or :html by default. def template_format - if @template_format.nil? - @template_format = - begin - if controller.request.accepts.first == Mime::JS - :js - else - controller.request.parameters[:format].to_sym - end - rescue - :html - end - end - @template_format + @template_format ||= controller.request.parameters[:format].to_sym rescue :html end def template_handler_preferences -- cgit v1.2.3