app/controllers/volunteers_controller.rb
# 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 index
    @volunteers = policy_scope(
      current_organization.volunteers.includes(:versions, :supervisor, :supervisor_volunteer, :casa_cases, case_assignments: [:casa_case]).references(:supervisor, :casa_cases)
    ).decorate
  end
def index @volunteers = policy_scope ( current_organization . volunteers . includes ( :versions , :supervisor , :supervisor_volunteer , :casa_cases , case_assignments : [ :casa_case ] ) . references ( :supervisor , :casa_cases ) ) . decorate 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
# Return all active/inactive volunteers, inactive will be filtered by default