aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/no_touching.rb
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2016-08-16 15:20:50 +0200
committerJean Boussier <jean.boussier@gmail.com>2016-08-16 15:20:50 +0200
commited34b6760793ebc8477f3cd6398ac3ef829b57d1 (patch)
tree8dd7d63c06cbae930b2413e38fa5b4e017929afb /activerecord/lib/active_record/no_touching.rb
parent245c64d428279122c5ae2ddfdc4d420a87a88f9a (diff)
downloadrails-ed34b6760793ebc8477f3cd6398ac3ef829b57d1.tar.gz
rails-ed34b6760793ebc8477f3cd6398ac3ef829b57d1.tar.bz2
rails-ed34b6760793ebc8477f3cd6398ac3ef829b57d1.zip
Makes touch_later respects no_touching policy
Diffstat (limited to 'activerecord/lib/active_record/no_touching.rb')
-rw-r--r--activerecord/lib/active_record/no_touching.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/no_touching.rb b/activerecord/lib/active_record/no_touching.rb
index edb5066fa0..4059020e25 100644
--- a/activerecord/lib/active_record/no_touching.rb
+++ b/activerecord/lib/active_record/no_touching.rb
@@ -45,6 +45,10 @@ module ActiveRecord
NoTouching.applied_to?(self.class)
end
+ def touch_later(*) # :nodoc:
+ super unless no_touching?
+ end
+
def touch(*) # :nodoc:
super unless no_touching?
end