search for: onvural

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

Did you mean: neural
2010 Dec 14
5
Build associated model confusion
..._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========== class Dive < ActiveRecord::Base belongs_to :user has_one :location end require ''json'' require ''net/http'' require ''uri'' class Location < ActiveRecord::Base has_many :dive def initialize(locatio...