aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-05-15 03:13:32 +0000
committerRick Olson <technoweenie@gmail.com>2007-05-15 03:13:32 +0000
commit80074cb4de2e60cd771b76d396d61e5c4bc0aff6 (patch)
treef8d6991a146e1268750f2be8b1e3ff62e9dbbc98 /actionpack/lib/action_view
parentf8273e430916f8c7b0d21ad14aab90e427f8c0a6 (diff)
downloadrails-80074cb4de2e60cd771b76d396d61e5c4bc0aff6.tar.gz
rails-80074cb4de2e60cd771b76d396d61e5c4bc0aff6.tar.bz2
rails-80074cb4de2e60cd771b76d396d61e5c4bc0aff6.zip
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
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/base.rb14
1 files changed, 1 insertions, 13 deletions
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