diff options
| author | Teddy Wing | 2017-05-22 13:44:45 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-05-22 13:44:45 +0200 |
| commit | 9ff6f376add6ff06ccd09f9b73b8d903149c7a7b (patch) | |
| tree | c75004c5be780847944e4756c9c203258111a293 /app/assets/javascripts | |
| parent | 61cffec83b8d83fd330175cd9798cecd9338e967 (diff) | |
| download | chouette-core-9ff6f376add6ff06ccd09f9b73b8d903149c7a7b.tar.bz2 | |
VehicleJourney: Add #exclude_journeys_without_time_tables
A new class method that allows us to filter out vehicle journeys that
aren't associated with `TimeTable`s.
This is what back the filter toggle on VehicleJourneys#index for
"Afficher les courses sans calendrier".
Using a subquery to allow us to filter out duplicates, so we don't end
up with duplicate vehicle journeys in the final result set. Then we just
remove the vehicle journeys that have no entries in the
`time_tables_vehicle_journeys` through table, leaving us with only the
vehicle journeys that have associated calendars.
Refs #3427
Diffstat (limited to 'app/assets/javascripts')
0 files changed, 0 insertions, 0 deletions
