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=