Class: Avo::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Avo::ApplicationController
show all
- Defined in:
- app/controllers/avo/application_controller.rb
Instance Method Summary
collapse
Instance Method Details
#exception_logger(exception) ⇒ Object
11
12
13
14
15
16
17
18
19
20
|
# File 'app/controllers/avo/application_controller.rb', line 11
def exception_logger(exception)
respond_to do |format|
format.html { raise exception }
format.json { render json: {
errors: exception.record.present? ? exception.record.errors : [],
message: exception.message,
traces: exception.backtrace,
}, status: ActionDispatch::ExceptionWrapper.status_code_for_exception(exception.class.name) }
end
end
|
#init_app ⇒ Object
7
8
9
|
# File 'app/controllers/avo/application_controller.rb', line 7
def init_app
Avo::App.init
end
|