On Oct 23, 5:26 pm, "Pardee, Roy" <[EMAIL PROTECTED]> wrote:
> You shouldn't have to worry about that.  In this code:
>
> Product.transaction do
>   @product.save!               #<-- this saves the product, retrieving the 
> db-assigned ID
>   @details.product = @product  #<-- this writes @product.id to 
> @details.product_id
>   @details.save!               #<-- this saves the @details (since it's 
> associated w/the product)
>   redirect_to :action => :show, :id => @product
> end
>
Awesome! Thanks a lot!

--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
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