Class: WhatsWrong::ExceptionsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/whats_wrong/exceptions_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



3
4
5
6
7
8
9
# File 'app/controllers/whats_wrong/exceptions_controller.rb', line 3

def show
  exception  = env['action_dispatch.exception']
  path_info = request.path_info
  status = path_info[1..-1].to_i
  original_path = env["action_dispatch.original_path"]
  render plain: "status: #{status}, origin_path: #{original_path}"
end