Seva Orlov
Seva Orlov
we have the same problem
@perky123, no, I didn't fix that
@bigxiang, hi, do you plan to move it forward?
maybe not so slow, so one possible solution I see is ``` ruby def execute_after_commit(&block) transactions = ActiveRecord::Base.connection.transaction_manager.instance_variable_get(:@stack) records = transactions.map(&:records).flatten.uniq if ActiveRecord::Base.connection.open_transactions == 0 || !records.include?(self) block.call end ......
I think that is ok. When we call `execute_after_commit` we want to execute the code after current record transaction, but if there is no transaction for that record, that means...