aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-08-24 10:45:16 -0300
committerJosé Valim <jose.valim@gmail.com>2010-08-24 10:45:16 -0300
commit6ef60bd9ffff44187b3016d00923835a609293bf (patch)
treede90134f04dfa5076dedae01b9aa4b6858fb031a /activerecord
parent7d71b785a95ac77c214e708f615f9ec6402fc016 (diff)
downloadrails-6ef60bd9ffff44187b3016d00923835a609293bf.tar.gz
rails-6ef60bd9ffff44187b3016d00923835a609293bf.tar.bz2
rails-6ef60bd9ffff44187b3016d00923835a609293bf.zip
Ensure timestamps are not generated when explicitly set to false [#5440 state:resolved]
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/timestamp.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/timestamp.rb b/activerecord/lib/active_record/timestamp.rb
index c6ff4b39fa..a7583f06cc 100644
--- a/activerecord/lib/active_record/timestamp.rb
+++ b/activerecord/lib/active_record/timestamp.rb
@@ -61,7 +61,7 @@ module ActiveRecord
end
def should_record_timestamps?
- record_timestamps && !partial_updates? || changed?
+ record_timestamps && (!partial_updates? || changed?)
end
def timestamp_attributes_for_update_in_model