Class: ActiveResource::Errors

Inherits:
ActiveModel::Errors
  • Object
show all
Defined in:
lib/patches/ar2/validations.rb,
lib/patches/ar3/validations.rb

Instance Method Summary collapse

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(messages)
  clear
  messages.each do |msg|
    add msg[0], msg[1]
  end
end