ActiveRecord & Database Transactions & Rails

52 views
Skip to first unread message

Mark Ellul

unread,
Jun 2, 2013, 5:50:28 AM6/2/13
to pluginaw...@googlegroups.com
Hi,

I am using Rails with the the activerecord version of the state machine, and I have a simple question.

Basically I have about 3 different state machines getting changed in the same context of a request and I want a ALL or nothing approach. i.e. if something fails in the request (not necessarily in the state machine), I want all objects to return to their previous state.

If I want to use the transaction that Rails uses for each request do I just disable the statemachine's activerecord transactions?

Thanks in Advance

Mark
Reply all
Reply to author
Forward
0 new messages