app/controllers/employees_controller.rb
def index
    @year = @current_fiscal_year
    @groups = Group.order(:name)
    @services = Service.order(:name)
    @employees = filter_employees(params[:search])
    @employees = sort_results(params, @employees)
    @employees = @employees.paginate(:page => params[:page], 
                                     :per_page => session[:results_per_page])
  end
# Starts out as a list of all employees, but can be restricted by a search
Starts out as a list of all employees, but can be restricted by a search
Starts out as a list of all employees but can be restricted by a search
def index
    @year = @current_fiscal_year
    @groups = Group.order(:name)
    @services = Service.order(:name)
    @employees = filter_employees(params[:search])
    @employees = sort_results(params, @employees)
    @employees = @employees.paginate(:page => params[:page], 
                                     :per_page => session[:results_per_page])
  end
def index @year = @current_fiscal_year @groups = Group . order ( :name ) @services = Service . order ( :name ) @employees = filter_employees ( params [ :search ] ) @employees = sort_results ( params , @employees ) @employees = @employees . paginate ( :page => params [ :page ] , :per_page => session [ :results_per_page ] ) end
Starts out as a list of all employees, but can be restricted by a search
Starts out as a list of all employees but can be restricted by a search