From 177989c6c0bfaffbb9dbf034b3b01d6e3edf1429 Mon Sep 17 00:00:00 2001
From: Harry Brundage <harry.brundage@gmail.com>
Date: Mon, 26 Aug 2013 13:15:37 -0400
Subject: Make AR::Base#touch fire the after_commit and after_rollback
 callbacks

---
 activerecord/lib/active_record/transactions.rb | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'activerecord/lib')

diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb
index 3f6f4748c6..c33ffeece0 100644
--- a/activerecord/lib/active_record/transactions.rb
+++ b/activerecord/lib/active_record/transactions.rb
@@ -273,6 +273,10 @@ module ActiveRecord
       with_transaction_returning_status { super }
     end
 
+    def touch(*) #:nodoc:
+      with_transaction_returning_status { super }
+    end
+
     # Reset id and @new_record if the transaction rolls back.
     def rollback_active_record_state!
       remember_transaction_record_state
-- 
cgit v1.2.3