Class: Validatable::Errors
- Inherits:
-
Object
- Object
- Validatable::Errors
- Defined in:
- lib/ext/validatable_ext.rb
Instance Method Summary collapse
-
#add(attribute, message, humanized_name = nil) ⇒ Object
:nodoc:.
- #add_without_humanize_options ⇒ Object
-
#humanize(lower_case_and_underscored_word) ⇒ Object
:nodoc:.
- #humanize_without_humanize_options ⇒ Object
Instance Method Details
#add(attribute, message, humanized_name = nil) ⇒ Object
:nodoc:
10 11 12 13 |
# File 'lib/ext/validatable_ext.rb', line 10 def add(attribute, , humanized_name=nil) #:nodoc: humanized_names[attribute.to_sym] = humanized_name (attribute, ) end |
#add_without_humanize_options ⇒ Object
9 |
# File 'lib/ext/validatable_ext.rb', line 9 alias :add_without_humanize_options :add |
#humanize(lower_case_and_underscored_word) ⇒ Object
:nodoc:
17 18 19 |
# File 'lib/ext/validatable_ext.rb', line 17 def humanize(lower_case_and_underscored_word) #:nodoc: humanized_names[lower_case_and_underscored_word.to_sym] || (lower_case_and_underscored_word) end |
#humanize_without_humanize_options ⇒ Object
15 |
# File 'lib/ext/validatable_ext.rb', line 15 alias :humanize_without_humanize_options :humanize |