Exception: Motr::Errors::MotrError
- Inherits:
-
StandardError
- Object
- StandardError
- Motr::Errors::MotrError
- Defined in:
- lib/motr/errors/motr_error.rb
Overview
Default parent Motr error for all custom errors. This handles the base key for the translations and provides the convenience method for translating the messages.
Direct Known Subclasses
Constant Summary collapse
- BASE_KEY =
"motr.errors"
Instance Method Summary collapse
-
#translate(key, options) ⇒ Object
## Translate an error message.
Instance Method Details
#translate(key, options) ⇒ Object
## Translate an error message
16 17 18 |
# File 'lib/motr/errors/motr_error.rb', line 16 def translate(key, ) ::I18n.translate("#{BASE_KEY}.#{key}", ) end |