Class: SearchController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- SearchController
- Includes:
- ActionView::Helpers::SanitizeHelper
- Defined in:
- app/controllers/search_controller.rb
Constant Summary collapse
- RESULTS_SEARCH_PER_PAGE =
12
- MIN_QUERY =
2
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/search_controller.rb', line 8 def index if params[:search_query].blank? or too_short_query @search_result = [] else if params[:mode].eql? "header_search" @search_result = search :quick render :partial => "header_search" return else if params[:focus].present? @search_result = focus_search else @search_result = search :extended end end end end |