I need to create a sort of transaction around some Active Record objects that perform many insert/updates.
def transaction &block
@my_var = value
I have a gem that add a method into AR::Base and I need to read the variables setted by the transaction inside the method at runtime.
Any way I can access the block scope from there inside?