Class: Kaui::HomeController
- Inherits:
-
EngineController
- Object
- ApplicationController
- EngineController
- Kaui::HomeController
- Defined in:
- app/controllers/kaui/home_controller.rb
Constant Summary collapse
- QUERY_PARSE_REGEX =
['FIND:(?<object_type>.*) BY:(?<search_by>.*) FOR:(?<search_for>.*) ONLY_FIRST:(?<fast>.*)', 'FIND:(?<object_type>.*) BY:(?<search_by>.*) FOR:(?<search_for>.*)', 'FIND:(?<object_type>.*) FOR:(?<search_for>.*) ONLY_FIRST:(?<fast>.*)', 'FIND:(?<object_type>.*) FOR:(?<search_for>.*)'].freeze
- SIMPLE_PARSE_REGEX =
'(?<search_for>.*)'
Constants included from EngineControllerUtil
EngineControllerUtil::MAXIMUM_NUMBER_OF_RECORDS_DOWNLOAD, EngineControllerUtil::SIMPLE_PAGINATION_THRESHOLD
Instance Method Summary collapse
Methods inherited from EngineController
#check_for_redirect_to_tenant_screen, #current_ability, #current_user, #options_for_klient, #populate_account_details, #retrieve_allowed_users_for_current_user, #retrieve_tenants_for_current_user
Methods included from ErrorHandler
Instance Method Details
#index ⇒ Object
12 13 14 |
# File 'app/controllers/kaui/home_controller.rb', line 12 def index @search_query = params[:q] end |
#search ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'app/controllers/kaui/home_controller.rb', line 16 def search object_type, search_query, search_by, fast = parse_query(params[:q]) return if object_type.nil? = send("#{object_type}_search", search_query, search_by, fast, ) end |