Evan wrote: > Hello. > > I have an object which is related to a second object through has_many. > The second object (obviously) is related to the first through > belongs_to. I want to ensure that neither object is saved to the > database without the presence of the other. How can I do this? > > Thanks. > > Evan
Use transaction -- Posted via http://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 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 -~----------~----~----~----~------~----~------~--~---