Unpermitted Parameters adding new fields to Devise in rails 4.0

后端 未结 7 1716
灰色年华
灰色年华 2020-12-02 09:26

Very new to working with rails. I have implemented a basic login system using Devise. I am trying to add a couple of new fields (bio:string, name:string) into the sign_up pa

7条回答
  •  青春惊慌失措
    2020-12-02 09:55

    Devise prepared everything for that :

    In the users controller you have

    private
    
    # Never trust parameters from the scary internet, only allow the white list through.
    def user_params
      params.require(:user).permit(:full_name )
    end
    

提交回复
热议问题