Class: SearchController

Inherits:
ApplicationController show all
Defined in:
app/controllers/search_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#admin_login_required, #all_done_todos_for, #boolean_param, cas_enabled?, #cas_enabled?, #count_deferred_todos, #count_undone_todos, #count_undone_todos_phrase, #done_todos_for, #enable_mobile_content_negotiation, #for_autocomplete, #format_date, #format_dependencies_as_json_for_auto_complete, #handle_unverified_request, #init_data_for_sidebar, #init_not_done_counts, #init_project_hidden_todo_counts, #mobile?, #notify, openid_enabled?, #openid_enabled?, #parse_date_per_user_prefs, prefered_auth?, #prefered_auth?, #redirect_back_or_home, #render_failure, #sanitize, #set_charset, #set_group_view_by, #set_locale, #set_session_expiration, #set_time_zone, #set_zindex_counter, #todo_xml_params

Methods included from LoginSystem

#access_denied, #authorize?, #basic_auth_denied, #current_user, #get_basic_auth_data, #get_current_user, #logged_in?, #login_from_cookie, #login_optional, #login_or_feed_token_required, #login_required, #logout_user, #prefs, #protect?, #redirect_back_or_default, #redirect_to_login, #set_current_user, #store_location

Instance Method Details

#indexObject



19
20
21
# File 'app/controllers/search_controller.rb', line 19

def index
  @page_title = "TRACKS::Search"
end

#resultsObject



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/search_controller.rb', line 5

def results
  @source_view = params['_source_view'] || 'search'
  @page_title = "TRACKS::Search Results for #{params[:search]}"

  searcher = Search::SearchResults.new(current_user, params[:search])
  searcher.search

  @results = searcher.results
  @count = searcher.number_of_finds

  init_not_done_counts
  init_project_hidden_todo_counts
end