Module: ObjectAttorney::Errors::ClassMethods
- Defined in:
- lib/object_attorney/errors.rb
Overview
ActiveModel::Errors told me to declare the following methods for a minimal implementation
Instance Method Summary collapse
- #human_attribute_name(attribute, _ = {}) ⇒ Object
-
#i18n_scope ⇒ Object
Necessary for proper translations.
-
#lookup_ancestors ⇒ Object
Necessary for proper translations.
Instance Method Details
#human_attribute_name(attribute, _ = {}) ⇒ Object
8 9 10 |
# File 'lib/object_attorney/errors.rb', line 8 def human_attribute_name(attribute, _ = {}) attribute end |
#i18n_scope ⇒ Object
Necessary for proper translations
18 19 20 |
# File 'lib/object_attorney/errors.rb', line 18 def i18n_scope :activemodel end |
#lookup_ancestors ⇒ Object
Necessary for proper translations
13 14 15 |
# File 'lib/object_attorney/errors.rb', line 13 def lookup_ancestors [self] end |