Handle the transaction in ActiveRecord::Base

Hi all,

             I am using ActiveRecord for handling the DML operations in
Database. In that I used "create" method for populating the data in
specified table. In activerecord it will build a separate transaction
block for every query. But I want to handle the transaction myself.
Means I want
to execute more than one query in my transaction. How can I do that???

Thanks in advance....

Attachments:
http://www.ruby-forum.com/attachment/6478/test.rb

···

--
Posted via http://www.ruby-forum.com/.

abinila shanthi wrote in post #1014349:

             I am using ActiveRecord for handling the DML operations in
Database. In that I used "create" method for populating the data in
specified table. In activerecord it will build a separate transaction
block for every query. But I want to handle the transaction myself.
Means I want
to execute more than one query in my transaction. How can I do that???

1. Go to google, enter "activerecord transaction". The exact answer you
are looking for is the first hit:

2. ActiveRecord is a component of Rails, so a Rails mailing list would
be a better place to post this or similar questions. Ruby is not Rails,
and vice versa.

Regards,

Brian.

···

--
Posted via http://www.ruby-forum.com/\.