Module: Rexception
- Defined in:
- lib/rexception.rb,
lib/rexception/railtie.rb,
lib/rexception/version.rb,
lib/rexception/exceptions_controller.rb
Defined Under Namespace
Classes: ExceptionsController, Railtie
Constant Summary collapse
- VERSION =
'0.1.0'
Class Attribute Summary collapse
-
.errors_dir ⇒ String
Directory name where you place error pages.
-
.layout ⇒ String
Layout file name to use for rendering error page.
Class Method Summary collapse
-
.configure { ... } ⇒ Object
Configuring module attributes by initializer.
-
.rescue_responses=(rescue_responses) ⇒ Hash{String => Symbol}
Pairs of custom exceptions and statuses.
Class Attribute Details
.errors_dir ⇒ String
Directory name where you place error pages.
16 17 18 |
# File 'lib/rexception.rb', line 16 def errors_dir @errors_dir end |
.layout ⇒ String
Layout file name to use for rendering error page.
11 12 13 |
# File 'lib/rexception.rb', line 11 def layout @layout end |
Class Method Details
.configure { ... } ⇒ Object
Configuring module attributes by initializer.
28 29 30 |
# File 'lib/rexception.rb', line 28 def configure yield self end |
.rescue_responses=(rescue_responses) ⇒ Hash{String => Symbol}
Pairs of custom exceptions and statuses.
21 22 23 |
# File 'lib/rexception.rb', line 21 def rescue_responses=(rescue_responses) ActionDispatch::ExceptionWrapper.rescue_responses.merge!(rescue_responses) end |