Exception: Loaf::LoafError
- Inherits:
-
StandardError
- Object
- StandardError
- Loaf::LoafError
- Defined in:
- lib/loaf/errors.rb
Overview
Default Loaf error for all custom errors.
Direct Known Subclasses
Constant Summary collapse
- BASE_KEY =
"loaf.errors"
Instance Method Summary collapse
Instance Method Details
#error_message(key, attributes) ⇒ Object
9 10 11 |
# File 'lib/loaf/errors.rb', line 9 def (key, attributes) translate(key, attributes) end |
#translate(key, options) ⇒ Object
13 14 15 |
# File 'lib/loaf/errors.rb', line 13 def translate(key, ) ::I18n.translate("#{BASE_KEY}.#{key}", **{ :locale => :en }.merge()) end |