Class: SimplificatorInfrastructure::ErrorsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- SimplificatorInfrastructure::ErrorsController
- Defined in:
- app/controllers/simplificator_infrastructure/errors_controller.rb
Instance Method Summary collapse
Instance Method Details
#render_error ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/simplificator_infrastructure/errors_controller.rb', line 8 def render_error respond_to do |format| format.any do render template_for_status_code, status: error_summary.status_code, content_type: 'text/html' end format.json do render json: {message: "An error occured"}, status: error_summary.status_code end end end |