app/controllers/supervisors_controller.rb
def update_supervisor_params
    return SupervisorParameters.new(params).without_type if current_user.casa_admin?

    SupervisorParameters.new(params).without_type.without_active
  end
# Uses authenticate_user to redirect if no user is signed in
# and must_be_admin_or_supervisor to check user's role is appropriate
Uses authenticate_user to redirect if no user is signed in
and must_be_admin_or_supervisor to check user's role is appropriate
Uses authenticate_user to redirect if no user is signed in and must_be_admin_or_supervisor to check user ' s role is appropriate
def update_supervisor_params
    return SupervisorParameters.new(params).without_type if current_user.casa_admin?
    SupervisorParameters.new(params).without_type.without_active
  end
def update_supervisor_params return SupervisorParameters . new ( params ) . without_type if current_user . casa_admin? SupervisorParameters . new ( params ) . without_type . without_active end
Uses authenticate_user to redirect if no user is signed in
and must_be_admin_or_supervisor to check user's role is appropriate
Uses authenticate_user to redirect if no user is signed in and must_be_admin_or_supervisor to check user ' s role is appropriate