From 09afbfd47f8180bb6d5f907abdeab6badeda879e Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 20 Mar 2009 18:51:01 +0000 Subject: Fix ActiveResource::Errors deprecation messages --- activeresource/lib/active_resource/validations.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activeresource/lib') diff --git a/activeresource/lib/active_resource/validations.rb b/activeresource/lib/active_resource/validations.rb index ca01ed3c75..7fe3162c02 100644 --- a/activeresource/lib/active_resource/validations.rb +++ b/activeresource/lib/active_resource/validations.rb @@ -4,7 +4,7 @@ module ActiveResource # Active Resource validation is reported to and from this object, which is used by Base#save # to determine whether the object in a valid state to be saved. See usage example in Validations. - class Errors < ::ActiveModel::Errors + class Errors < ActiveModel::Errors # Grabs errors from the XML response. def from_xml(xml) clear @@ -38,7 +38,7 @@ module ActiveResource # person.errors.empty? # => false # person.errors.count # => 1 # person.errors.full_messages # => ["Last name can't be empty"] - # person.errors.on(:last_name) # => "can't be empty" + # person.errors[:last_name] # => ["can't be empty"] # person.last_name = "Halpert" # person.save # => true (and person is now saved to the remote service) # -- cgit v1.2.3