app/controllers/people_controller.rb
# Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet only allow the white list through .
def person_params
    permit = %i(id first_name last_name gender date_of_birth place_of_birth) + contact_params
    permit += [as_mentor_attributes: [:id, :organisation_id, :qualified]] 
    params.require(:person).permit(permit)
  end
def person_params permit = %i( id first_name last_name gender date_of_birth place_of_birth ) + contact_params permit += [ as_mentor_attributes : [ :id , :organisation_id , :qualified ] ] params . require ( :person ) . permit ( permit ) end
Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet only allow the white list through .
#if mentor?