Melih Onvural wrote in post #968249: > I'm new to Rails3, and I'm just trying to get one last thing to work > before I call it a night. The situation is the following (please if > the code is horrible, just let me know, still learning): > > I want to log a dive. I might have a new location on that dive at > which point I have to create a new Location, and then create the dive. > A dive has_one location. A location has_many dives. Currently the > foreign key is on dive as location_id.
Then Dive belongs_to Location. Go review the difference between belongs_to and has_one. Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] Sent from my iPhone -- 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 [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.

