aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-09-20 20:02:41 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-09-20 20:02:41 +0000
commitd137281d2560af134c726af36a8c7f0491a0b4a0 (patch)
tree68eb0fa7809b83f4016ce366e618b0390029e3ab /actionpack
parent4d63e01fa052749f742e90bcb3889cbae6152c92 (diff)
downloadrails-d137281d2560af134c726af36a8c7f0491a0b4a0.tar.gz
rails-d137281d2560af134c726af36a8c7f0491a0b4a0.tar.bz2
rails-d137281d2560af134c726af36a8c7f0491a0b4a0.zip
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
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/mime_responds.rb4
1 files 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