aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2005-09-26 21:55:37 +0000
committerMarcel Molina <marcel@vernix.org>2005-09-26 21:55:37 +0000
commit1d738cab80b497f13ef6cfca1a658c6400609698 (patch)
tree10eee8abc868fde7cfe5638de06e73270b9ceb2d /activerecord/lib/active_record/base.rb
parent1465f9cee27a55b5c13bad35bac74be119097f17 (diff)
downloadrails-1d738cab80b497f13ef6cfca1a658c6400609698.tar.gz
rails-1d738cab80b497f13ef6cfca1a658c6400609698.tar.bz2
rails-1d738cab80b497f13ef6cfca1a658c6400609698.zip
Make update_attribute use the same writer method that update_attributes uses.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 6f655df26f..37ed2071cf 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1057,7 +1057,7 @@ module ActiveRecord #:nodoc:
# Note: This method is overwritten by the Validation module that'll make sure that updates made with this method
# doesn't get subjected to validation checks. Hence, attributes can be updated even if the full object isn't valid.
def update_attribute(name, value)
- self[name] = value
+ send(name.to_s + '=', value)
save
end