aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTeddy Wing2018-05-14 17:42:53 +0200
committerTeddy Wing2018-05-14 17:42:53 +0200
commit307052d83619ca63532f46e1326f83450daefa10 (patch)
tree7c5cbed9db4c792fa682b30cfa4e2479fb296184 /app
parentc048a5a7e5295b7a84d87ed4e850affe598d5588 (diff)
downloadchouette-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.rb7
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