# File lib/active_record/persistence.rb, line 226 def touch(name = nil) attributes = timestamp_attributes_for_update_in_model attributes << name if name unless attributes.empty? current_time = current_time_from_proper_timezone changes = {} attributes.each do |column| changes[column.to_s] = write_attribute(column.to_s, current_time) end @changed_attributes.except!(*changes.keys) primary_key = self.class.primary_key self.class.update_all(changes, { primary_key => self[primary_key] }) == 1 end end