ar_transaction_changes
ar_transaction_changes copied to clipboard
Suggestion for optimization
Has there been any thought to making only work within a transaction?
I.e. if no AR transaction is happening then don't do anything, but once you are inside a transaction then start recording.
This way if you are applying this gem to all models, you maybe don't have to worry as much about efficiency.
Further thinking about this... why not just accumulate the active_record previous_changes values until the the transaction is exited? Understand both these suggestions would probably require monkey patching, but still it seems it might be more efficient? Just wondering if this occurred to anyone already