diff options
author | Marcel Molina <marcel@vernix.org> | 2005-09-26 21:55:37 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2005-09-26 21:55:37 +0000 |
commit | 1d738cab80b497f13ef6cfca1a658c6400609698 (patch) | |
tree | 10eee8abc868fde7cfe5638de06e73270b9ceb2d /activerecord/lib/active_record/validations.rb | |
parent | 1465f9cee27a55b5c13bad35bac74be119097f17 (diff) | |
download | rails-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/validations.rb')
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 6481e37a25..8f407b25c3 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -661,7 +661,7 @@ module ActiveRecord # This is especially useful for boolean flags on existing records. The regular +update_attribute+ method # in Base is replaced with this when the validations module is mixed in, which it is by default. def update_attribute_with_validation_skipping(name, value) - self[name] = value + send(name.to_s + '=', value) save(false) end |