Class: RestfulError::ExceptionsController

Inherits:
ActionController::Metal
  • Object
show all
Includes:
AbstractController::Rendering, ActionView::Layouts
Defined in:
lib/restful_error.rb

Instance Method Summary collapse

Instance Method Details

#showObject



55
56
57
58
59
60
61
62
63
64
65
# File 'lib/restful_error.rb', line 55

def show
  ex = env["action_dispatch.exception"]
  @exception     = ex.extend(Helper)
  ex.restful.set_env(env)
  @status_code   = ex.restful.status_code
  @reason_phrase = ex.restful.reason_phrase
  @message       = ex.restful.message

  self.status = @status_code
  render 'restful_error/show'
end