Using transaction in ruby on rails

Hi,

How to use transaction in my application.

I have lot of insert sql statement to be done into different table and I
am doing it in controller. How can I implement transaction in
controller?
Please help to solve this

Try this…

transaction do
david.withdrawal(100)
mary.deposit(100)
end

http://www.bigbold.com/snippets/posts/show/381

Andy

On Feb 5, 7:45 pm, Santosh R patil [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs