app/controllers/delegates_controller.rb
def delegate_params
      permitted_params = params.require(:delegate).permit(:delegate_id)

      # the delegator can only be the logged in user
      permitted_params.merge(delegator_id: current_staff_profile.id)
    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.
Never trust parameters from the scary internet only allow the white list through .
def delegate_params
      permitted_params = params.require(:delegate).permit(:delegate_id)
      permitted_params.merge(delegator_id: current_staff_profile.id)
    end
def delegate_params permitted_params = params . require ( :delegate ) . permit ( :delegate_id ) permitted_params . merge ( delegator_id : current_staff_profile . id ) 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 .
# the delegator can only be the logged in user