Using transaction in ruby on rails


#1

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


#2

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 removed_email_address@domain.invalid