aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_dispatch/middleware/public_exceptions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/public_exceptions.rb b/actionpack/lib/action_dispatch/middleware/public_exceptions.rb
index 11eb418668..204f3f7fb3 100644
--- a/actionpack/lib/action_dispatch/middleware/public_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/public_exceptions.rb
@@ -12,7 +12,7 @@ module ActionDispatch
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)