Module: Lipstick::DynamicErrors
- Defined in:
- lib/lipstick/errors/dynamic_errors.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/lipstick/errors/dynamic_errors.rb', line 20 def self.included(base) base.rescue_from Forbidden, with: :forbidden base.rescue_from Unauthorized, with: :unauthorized base.rescue_from BadRequest, with: :bad_request base.rescue_from NotFound, with: :not_found base.rescue_from(::ActiveRecord::RecordNotFound, with: :not_found) end |