Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

content_type is already a Mime::Type object

  • Loading branch information...
commit fa4b0295b62c1ff60d28f267435bfa7d90db5b95 1 parent 0e06e8a
@spastorino spastorino authored
View
2  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)
Please sign in to comment.
Something went wrong with that request. Please try again.