I need to create a row in both tickets and users table... I just need to know how to process in case the transaction fails.
@ticket.transaction do
@ticket.save!
@user.save!
end
#if (transaction succeeded)
#.....
#else (transaction failed)
#......
#end
On a side note I'd just like to thank everyone who participates at stack overflow for helping a designer learn more programming... I appreciate the time you guys take out of your day to answer n00b questions like this :)