From 7af12d04cebe3a1ffcf55cae967d22fc7b0606c8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 12 Mar 2006 06:02:44 +0000 Subject: Added synonym and custom type handling to respond_to [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/request.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller/request.rb') diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index 300a0ea60c..cbefc2e490 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -61,7 +61,7 @@ module ActionController end end - @content_type = Mime::Type.new(@content_type) + @content_type = Mime::Type.lookup(@content_type) end def accepts @@ -71,7 +71,7 @@ module ActionController [ content_type, Mime::ALL ] else @env['HTTP_ACCEPT'].split(";").collect! do |mime_type| - Mime::Type.new(mime_type.strip) + Mime::Type.lookup(mime_type.strip) end end end -- cgit v1.2.3