diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-07-09 14:11:51 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-13 07:03:42 +0200 |
commit | 1d45ea081493cd4eca95cd75cce7be7b8d9cb07c (patch) | |
tree | ebf901a60827701e5e09c45d8d0cd24a4f69967d /activerecord/lib/active_record/persistence.rb | |
parent | 2aed63eb526b5493df63151e2bf451d55114c49a (diff) | |
download | rails-1d45ea081493cd4eca95cd75cce7be7b8d9cb07c.tar.gz rails-1d45ea081493cd4eca95cd75cce7be7b8d9cb07c.tar.bz2 rails-1d45ea081493cd4eca95cd75cce7be7b8d9cb07c.zip |
with this fix touch method - does not call validations - doest not call callbacks - updates updated_at/on along with attribute if attribute is provided - marks udpated_at/on and attribute as NOT changed
[#2520 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 828a8b41b6..44264bec7f 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -111,6 +111,7 @@ module ActiveRecord if record_update_timestamps timestamp_attributes_for_update_in_model.each do |column| hash[column] = read_attribute(column) + @changed_attributes.delete(column.to_s) end end |