Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit d137281d2560af134c726af36a8c7f0491a0b4a0 1 parent 4d63e01
@dhh dhh authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_controller/mime_responds.rb
View
4 actionpack/lib/action_controller/mime_responds.rb
@@ -130,12 +130,12 @@ def custom(mime_type, &block)
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
Please sign in to comment.
Something went wrong with that request. Please try again.