class TutorsController < ApplicationController
  respond_to :js

  # To display tutors
  def index
    add_breadcrumb "Dashboard", :dashboard_path  if logged_in?
    add_breadcrumb "Search Results", :tutors_path
    @tutors = Tutor.search(params).page(params[:page]).per(params[:per_page]).records
    @tutor_with_max_rate = Tutor.highest_rate.first
    @tutor_with_max_rating = Tutor.highest_reviewed.first
    respond_to do |format|
      format.html {render :layout => 'application' }
      format.js {render :layout => 'application' }
    end
  end

end
