Topic: Nested forms

Hi I am new to rails I am trying to use nested forms. I have a separate model for name and profile. The profile table has Date_of_Birth and Gender columns and the name table has first_name, middle_name and last_name.I have to take the inputs for the 2 table from the same form but it is showing an error. The code is as follow:-a) Profiles Controllerclass ProfilesController < ApplicationControllerlayout 'admin'    def new        @profile = DoctorProfile.new    end        def create        @profile = DoctorProfile.new(params[:doctor_profile])        if @profile.save            flash[:notice] = 'Profile Created Successfully'            redirect_to(@profile)        else            render('new')        end    end        endb) Profiles view (New)<div class=

Re: Nested forms

Please use mark-up tags to separate your code text for easier reading.
See more details on how to use it at http://railsforum.com/help.php?section=bbcode
Thank you.

Last edited by Javix (2012-04-02 08:43:19)