search for: friend_type

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

Did you mean: field_type
2006 May 27
0
newbie question: creating views to submit values
...ype = nil, params = nil) case type when "Family" return Family.new(params) when "Contact" return Contact.new(params) when nil return Friend.new(params) end This is the controller: def new @friend = Friend.factory(params[:friend_type]) end def create @friend = Friend.factory(params[:friend_type], params[:friend]) if @friend.save flash[:notice] = ''Friend was successfully created.'' redirect_to :action => ''list'' else render :action => ''new'...