aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/autocomplete_time_tables_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/autocomplete_time_tables_controller.rb b/app/controllers/autocomplete_time_tables_controller.rb
index d0cd94e26..f65f5b9f6 100644
--- a/app/controllers/autocomplete_time_tables_controller.rb
+++ b/app/controllers/autocomplete_time_tables_controller.rb
@@ -22,7 +22,12 @@ class AutocompleteTimeTablesController < InheritedResources::Base
scope.distinct
end
+ def split_params! search
+ params[:q][search] = params[:q][search].split(" ") if params[:q][search]
+ end
+
def collection
+ split_params! :comment_or_objectid_cont_any
@time_tables = select_time_tables.search(params[:q]).result.paginate(page: params[:page])
end
end