Does rails do a rollback if I use begin...rescue?

Posted by codeman73 on Stack Overflow See other posts from Stack Overflow or by codeman73
Published on 2010-04-23T17:41:54Z Indexed on 2010/04/23 17:43 UTC
Read the original article Hit count: 209

I'd like to add a begin...rescue block to one of my controllers create method, in order to log better info and construct the correct error message to return to the client. Does the rescue in any way 'interrupt' the rollback process?

I'm assuming rails automatically does a rollback. When does it happen? Has it already happened by the time I get in the rescue clause?

I'm using mySQL on Dreamhost and I think they use innoDB.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about transactions