Permalink
Browse files

content_type is already a Mime::Type object

  • Loading branch information...
1 parent 0e06e8a commit fa4b0295b62c1ff60d28f267435bfa7d90db5b95 @spastorino spastorino committed Jun 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/middleware/public_exceptions.rb
@@ -12,7 +12,7 @@ def call(env)
status = env["PATH_INFO"][1..-1]
request = ActionDispatch::Request.new(env)
content_type = request.formats.first
- format = (mime = Mime[content_type]) && "to_#{mime.to_sym}"
+ format = content_type && "to_#{content_type.to_sym}"
body = { :status => status, :error => exception.message }
render(status, body, :format => format, :content_type => content_type)

0 comments on commit fa4b029

Please sign in to comment.