search for: dives_controller

Displaying 1 result from an estimated 1 matches for "dives_controller".

2010 Dec 14
5
Build associated model confusion
...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. How do I properly, in my dives_controller, generate the location, get the ID, and pass it on to my new dive? It would be nice to have the constructor of Location called, but if it doesn''t work that way, then that''s okay too. My code is below: Thanks. -- Melih O. http://www.onvural.net/melih ==========CODE========== c...