Skip to content

Commit fa4b029

Browse files
committed
content_type is already a Mime::Type object
1 parent 0e06e8a commit fa4b029

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actionpack/lib/action_dispatch/middleware/public_exceptions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def call(env)
1212
status = env["PATH_INFO"][1..-1]
1313
request = ActionDispatch::Request.new(env)
1414
content_type = request.formats.first
15-
format = (mime = Mime[content_type]) && "to_#{mime.to_sym}"
15+
format = content_type && "to_#{content_type.to_sym}"
1616
body = { :status => status, :error => exception.message }
1717

1818
render(status, body, :format => format, :content_type => content_type)

0 commit comments

Comments
 (0)