diff options
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index f80e304c5d..707c1a05be 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -222,9 +222,8 @@ module ActiveRecord # @brake.touch def touch(name = nil) attributes = timestamp_attributes_for_update_in_model - unless attributes.blank? - attributes << name if name - + attributes << name if name + unless attributes.empty? current_time = current_time_from_proper_timezone changes = {} |