Class: Wallaby::ApplicationController
- Inherits:
-
Object
- Object
- Wallaby::ApplicationController
- Defined in:
- app/controllers/wallaby/application_controller.rb
Overview
Wallaby’s application controller It defaults to inherit from ::ApplicationController, which can be configured via ‘Wallaby.configuration.base_controller` It only contains the error handling logics
Direct Known Subclasses
Constant Summary collapse
- ERROR_PATH =
ERROR_LAYOUT = 'wallaby/error'.freeze
Class Method Summary collapse
-
.configuration ⇒ Wallaby::Configuration
Global configuration.
Instance Method Summary collapse
-
#bad_request(exception = nil) ⇒ Object
Bad request page.
-
#configuration ⇒ Wallaby::Configuration
Global configuration.
-
#healthy ⇒ Object
Health check page.
-
#not_found(exception = nil) ⇒ Object
Not found page.
-
#unprocessable_entity(exception = nil) ⇒ Object
Unprocessable entity page.
Class Method Details
.configuration ⇒ Wallaby::Configuration
Returns global configuration.
42 43 44 |
# File 'app/controllers/wallaby/application_controller.rb', line 42 def self.configuration ::Wallaby.configuration end |
Instance Method Details
#bad_request(exception = nil) ⇒ Object
Bad request page
31 32 33 |
# File 'app/controllers/wallaby/application_controller.rb', line 31 def bad_request(exception = nil) error_rendering(exception, __callee__) end |
#configuration ⇒ Wallaby::Configuration
Returns global configuration.
47 48 49 |
# File 'app/controllers/wallaby/application_controller.rb', line 47 def configuration self.class.configuration end |
#healthy ⇒ Object
Health check page
19 20 21 |
# File 'app/controllers/wallaby/application_controller.rb', line 19 def healthy render plain: 'healthy' end |
#not_found(exception = nil) ⇒ Object
Not found page
25 26 27 |
# File 'app/controllers/wallaby/application_controller.rb', line 25 def not_found(exception = nil) error_rendering(exception, __callee__) end |
#unprocessable_entity(exception = nil) ⇒ Object
Unprocessable entity page
37 38 39 |
# File 'app/controllers/wallaby/application_controller.rb', line 37 def unprocessable_entity(exception = nil) error_rendering(exception, __callee__) end |