Class: NiftyErrorpages::ErrorsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/nifty_errorpages/errors_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



6
7
8
9
10
11
12
# File 'app/controllers/nifty_errorpages/errors_controller.rb', line 6

def show
  status = request.path[1..-1]
  respond_to do |format|
    format.html { render action: status }
    format.json { render json: { status: status, error: get_error_message_for_json_format(status.to_i) } }
  end
end