class ActiveRecord::Transaction

def open?

Returns true if the transaction exists and isn't finalized yet.
def open?
  !closed?
end