On Mar 2, 2:30 pm, Hemant Bhargava <[email protected]> wrote:

> object = Model.find(:id)
> Model.transaction do
>   object.update_attributes!
> end
>
> Obviously this chunk of code is not working, thats why i asked you
> people..
>
Other than the fact that you're passing an invalid argument to find
and that update_attributes probably requires you to pass an argument
this should be fine (although obviously pointless unless you make
several changes within the transaction.

Fred
> Thanks in advance
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to