diff options
| author | Teddy Wing | 2018-02-22 16:49:02 +0100 | 
|---|---|---|
| committer | Johan Van Ryseghem | 2018-03-07 13:19:41 +0100 | 
| commit | 0baeff6da40e5f631ef32ebe553f881dfb31a0c2 (patch) | |
| tree | b7f5c8221cf68f1d5bf48b73367961b9928ed514 /config/routes.rb | |
| parent | a53eb22c144b12cf7b662db38ddbbba20af89d3a (diff) | |
| download | chouette-core-0baeff6da40e5f631ef32ebe553f881dfb31a0c2.tar.bz2 | |
ReferentialVehicleJourneys#index: Make lines filter asynchronous
Instead of doing a complex query to get the lines available to filter
on, just get all the lines in the current referential. We then filter
those by what was typed into the select2 box and asynchronously respond
with line options in a new JSON autocomplete controller.
Here we're only providing the option to filter by `number` and `name`
field on the line. I'd like to filter by everything in the
`#display_name`. I don't think the objectid is going to be easy to
integrate into the SQL query but I'd like to add the company part. It's
possible we could do the objectid filter in Ruby instead of the database
query.
Refs #5889
Diffstat (limited to 'config/routes.rb')
| -rw-r--r-- | config/routes.rb | 1 | 
1 files changed, 1 insertions, 0 deletions
| diff --git a/config/routes.rb b/config/routes.rb index a3a21511c..dc75bec11 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -41,6 +41,7 @@ ChouetteIhm::Application.routes.draw do        post :validate      end +    resources :autocomplete_lines, only: :index      resources :autocomplete_stop_areas, only: [:show, :index] do        get 'around', on: :member      end | 
