class Loaf::LoafError
Default Loaf
error for all custom errors.
Constants
- BASE_KEY
Public Instance Methods
error_message(key, attributes)
click to toggle source
# File lib/loaf/errors.rb, line 9 def error_message(key, attributes) translate(key, attributes) end
translate(key, options)
click to toggle source
# File lib/loaf/errors.rb, line 13 def translate(key, options) ::I18n.translate("#{BASE_KEY}.#{key}", **{ :locale => :en }.merge(options)) end