The transaction method is executed within the context of the active record class for the excution of the all transactions. Ex Account.transaction do account1.deposit(100) account2.withdraw(100) end But i want to execute the transaction within the context of more than on active record class then what would be the solution? How should i specify the context? Plz suggest me. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
vishal wrote:> The transaction method is executed within the context of the active > record class for the excution of the all transactions. > Ex > Account.transaction do > account1.deposit(100) > account2.withdraw(100) > end > > But i want to execute the transaction within the context of more than > on active record class then what would be the solution? How should i > specify the context?This was recently discussed in this thread: http://groups.google.dk/group/rubyonrails-talk/browse_frm/thread/28030e9f9f0e9ec/915fa8a26fdfaaf1?lnk=st&q=rails+transaction+atzen&rnum=2#915fa8a26fdfaaf1 -- Cheers, - Jacob Atzen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks Jacob. On Jul 20, 3:05 pm, Jacob Atzen <ja...-4U2y0bnePT5NzRJJ8cAMrg@public.gmane.org> wrote:> vishal wrote: > > The transaction method is executed within the context of the active > > record class for the excution of the all transactions. > > Ex > > Account.transaction do > > account1.deposit(100) > > account2.withdraw(100) > > end > > > But i want to execute the transaction within the context of more than > > on active record class then what would be the solution? How should i > > specify the context? > > This was recently discussed in this thread: > > http://groups.google.dk/group/rubyonrails-talk/browse_frm/thread/2803... > > -- > Cheers, > - Jacob Atzen--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---