gavinksong/cs169-cucec

View on GitHub
app/controllers/admins_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class AdminsController < ApplicationController
    before_action :authenticate_admin!
    
    def index
        @students = Student.all
        
        @sorting = params[:sort]
        if @sorting == "online"
            @mentors = Mentor.mentors_available_chat
        else
            @mentors = Mentor.all
        end
    end
end