From 1d45ea081493cd4eca95cd75cce7be7b8d9cb07c Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Fri, 9 Jul 2010 14:11:51 -0400 Subject: 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#2520 state:resolved] Signed-off-by: José Valim --- activerecord/lib/active_record/persistence.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib/active_record/persistence.rb') 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 -- cgit v1.2.3