Class: ActiveResource::Errors
- Inherits:
-
ActiveModel::Errors
- Object
- ActiveModel::Errors
- ActiveResource::Errors
- Defined in:
- lib/patches/ar2/validations.rb,
lib/patches/ar3/validations.rb
Instance Method Summary collapse
-
#from_array(messages, save_cache = false) ⇒ Object
Patched cause we dont need no attribute name magic ..
Instance Method Details
#from_array(messages, save_cache = false) ⇒ Object
Patched cause we dont need no attribute name magic .. and its just simpler orig version is looking up the humanized name of the attribute in the error message, which we dont supply => only field name is used in returned error msg
22 23 24 25 26 27 |
# File 'lib/patches/ar2/validations.rb', line 22 def from_array() clear .each do |msg| add msg[0], msg[1] end end |