From d137281d2560af134c726af36a8c7f0491a0b4a0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 20 Sep 2006 20:02:41 +0000 Subject: Just use the vanilla mime type string, no need for fancy lookups [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/mime_responds.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_controller/mime_responds.rb b/actionpack/lib/action_controller/mime_responds.rb index 6c721f4ba2..80464ffdcd 100644 --- a/actionpack/lib/action_controller/mime_responds.rb +++ b/actionpack/lib/action_controller/mime_responds.rb @@ -130,12 +130,12 @@ module ActionController #:nodoc: if block_given? @responses[mime_type] = Proc.new do - eval "response.content_type = Mime::#{mime_type.to_sym.to_s.upcase}", @block_binding + eval "response.content_type = '#{mime_type.to_s}'", @block_binding block.call end else if source = DEFAULT_BLOCKS[mime_type.to_sym] - @responses[mime_type] = eval(source, @block_binding) + @responses[mime_type] = eval(source, @block_binding) else raise ActionController::RenderError, "Expected a block but none was given for custom mime handler #{mime_type}" end -- cgit v1.2.3