Displaying 1 result from an estimated 1 matches for "create_loc".
Did you mean:
create_doc
2010 Dec 14
5
Build associated model confusion
...ot;location"]
["lng"]
end
def to_str
"#{self.name}::#{self.city}::#{self.region}::#{self.country}"
end
end
class DivesController < ApplicationController
def create
@dive = Dive.new(params[:dive])
if params[:location][:id] == "" then
@location = create_location(params[:location])
@dive.location_id = @location.id
else
@dive.location_id = params[:location][:id]
end
@dive.user_id = params[:user][:id]
end
end
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to thi...