From 68307a1ae5fc9e454230629f5cbbbeaf79fd7cec Mon Sep 17 00:00:00 2001 From: saksmlz Date: Wed, 31 Oct 2012 12:59:11 +0300 Subject: Fix ActiveRecord#update_column return value --- activerecord/lib/active_record/persistence.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index d492ac7f16..fd3380a53c 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -194,7 +194,7 @@ module ActiveRecord raise ActiveRecordError, "#{name} is marked as readonly" if self.class.readonly_attributes.include?(name) raise ActiveRecordError, "can not update on a new record object" unless persisted? - updated_count = self.class.update_all({ name => value }, self.class.primary_key => id) == 1 + updated_count = self.class.update_all({ name => value }, self.class.primary_key => id) raw_write_attribute(name, value) -- cgit v1.2.3