app/controllers/supervisors_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 edit
    @supervisor = Supervisor.find(params[:id])
    @assigned_volunteers = @supervisor.volunteers
    redirect_to root_url unless can_view_update_page?
  end
def edit @supervisor = Supervisor . find ( params [ :id ] ) @assigned_volunteers = @supervisor . volunteers redirect_to root_url unless can_view_update_page? 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