class Web::CandidatesController < Web::BaseController

  before_action :authenticate_candidate!, only: [:show]

  def index
    q = Candidate.order(:created_at).ransack(params[:q])
    @candidates = q.result.paginate(page: params[:page], per_page: 30)
  end

  def show
    @candidate = Candidate.find_by(id: params[:id])
  end

end