nested model attributes + wicked wizard form not working

北城余情 提交于 2019-12-07 11:17:29

When you're using accepts_nested_attributes_for you must specify your attributes to whitelist them: educations_attributes and works_attributes (as shown in the API)

def user_params
      params.require(:user).permit(
        :first_name, :last_name, :email, :password,
        :password_confirmation, :county_id, :area_id, :client, 
        educations_attributes: [:school_name, :degree, :year_started, :year_finished], 
        works_attributes: [:company_name, :work_title, :date_started, :date_finished]
      )
    end
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!