[Nitro] Transactions

George Moschovitis george.moschovitis at gmail.com
Thu Sep 20 03:33:24 EDT 2007


A quick example:

Article.transaction do
  article1.save
  article2.save
end

or

Og.manager.with_store do |s|
  s.transaction do
    article.save
    user.save
  end
end


-g.




On 9/20/07, Matthew B Gardner <weather at speakeasy.net> wrote:
>
> I've looked around and can't find information regarding how to perform
> transactions in Og -- I did find some mention of Og having support for it,
> but the trail died there. All I'm looking to do at the moment is this...
>
> start transaction
> save obj1
> save obj2
> rollback if errors
>
> Does Og already have something elegant for this?
>
> Thanks for any help,
> Matt
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://www.me.gr
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070920/e3fa8691/attachment.html 


More information about the Nitro-general mailing list