From ed34b6760793ebc8477f3cd6398ac3ef829b57d1 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Tue, 16 Aug 2016 15:20:50 +0200 Subject: Makes touch_later respects no_touching policy --- activerecord/lib/active_record/no_touching.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/no_touching.rb') 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 -- cgit v1.2.3