diff options
| author | Teddy Wing | 2018-05-14 17:42:53 +0200 |
|---|---|---|
| committer | Teddy Wing | 2018-05-14 17:42:53 +0200 |
| commit | 307052d83619ca63532f46e1326f83450daefa10 (patch) | |
| tree | 7c5cbed9db4c792fa682b30cfa4e2479fb296184 /app | |
| parent | c048a5a7e5295b7a84d87ed4e850affe598d5588 (diff) | |
| download | chouette-core-307052d83619ca63532f46e1326f83450daefa10.tar.bz2 | |
CleanUp: Remove `#destroy_vehicle_journeys_outside_referential`
This method is superseded by `#destroy_routes_outside_referential`,
which will cascade deletion to include vehicle journeys.
Refs #6854
Diffstat (limited to 'app')
| -rw-r--r-- | app/models/clean_up.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/models/clean_up.rb b/app/models/clean_up.rb index cf8908263..f668b9fda 100644 --- a/app/models/clean_up.rb +++ b/app/models/clean_up.rb @@ -43,7 +43,7 @@ class CleanUp < ApplicationModel end end - destroy_vehicle_journeys_outside_referential + destroy_routes_outside_referential # Disabled for the moment. See #5372 # destroy_time_tables_outside_referential @@ -100,11 +100,6 @@ class CleanUp < ApplicationModel destroy_time_tables(time_tables) end - def destroy_vehicle_journeys_outside_referential - line_ids = referential.metadatas.pluck(:line_ids).flatten.uniq - Chouette::VehicleJourney.joins(:route).where(["routes.line_id not in (?)", line_ids]).destroy_all - end - def destroy_routes_outside_referential line_ids = referential.metadatas.pluck(:line_ids).flatten.uniq Chouette::Route.where(['line_id not in (?)', line_ids]).destroy_all |
