Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion config/initializers/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ def save_without_touching_context
end

def touch_context
return if @@skip_touch_context ||= false || @skip_touch_context ||= false
skip1 = defined?(@@skip_touch_context) ? @@skip_touch_context : false
skip2 = @skip_touch_context.nil? ? false : @skip_touch_context
return if skip1 || skip2

self.class.connection.after_transaction_commit do
if respond_to?(:context_type) && respond_to?(:context_id) && context_type && context_id
Expand Down