Module: Cuba::Errors
- Defined in:
- lib/cuba/errors.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.setup(app) ⇒ Object
3 4 5 |
# File 'lib/cuba/errors.rb', line 3 def self.setup(app) app.settings[:errors] ||= {} end |
Instance Method Details
#forbidden! ⇒ Object
7 8 9 |
# File 'lib/cuba/errors.rb', line 7 def forbidden! error! 403, :forbidden end |
#internal_server_error! ⇒ Object
15 16 17 |
# File 'lib/cuba/errors.rb', line 15 def internal_server_error! error! 500, :internal_server_error end |
#not_found! ⇒ Object
11 12 13 |
# File 'lib/cuba/errors.rb', line 11 def not_found! error! 404, :not_found end |