http://edgeapi.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html under "Exception handling and rolling back" says that "One should restart the entire transaction if an ActiveRecord::StatementInvalid occurred." My question is how? I tried wrapping the statements in two separate transaction block but that still doesn't work.
I have something like:
self.transaction doend
and PG would still complain about it with "PG::Error: ERROR: current transaction is aborted, commands ignored until end of transaction block". So my question is whether there is a proper way of restarting the transaction? Thanks!
Ken
end