diff options
| author | Luc Donnet | 2017-09-07 16:28:32 +0200 |
|---|---|---|
| committer | Luc Donnet | 2017-09-07 16:28:32 +0200 |
| commit | 99aff9c3e63fb15b555806847bc14fbf56eeef2a (patch) | |
| tree | 339ca9b884504c19cecc0956c629614ace926901 /app/controllers | |
| parent | 8b5a3e68c37a9331f47608faaa6903a01c390861 (diff) | |
| parent | 01b0d19c329810a083153efbf040911e4079f6ef (diff) | |
| download | chouette-core-99aff9c3e63fb15b555806847bc14fbf56eeef2a.tar.bz2 | |
Merge branch 'master' of github.com:AF83/stif-boiv
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/autocomplete_time_tables_controller.rb | 5 |
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 |
