app/models/concerns/clean_up_methods.rb
def clean_unassociated_vehicle_journeys
    Chouette::Benchmark.measure 'clean_unassociated_vehicle_journeys' do
      Chouette::VehicleJourney.where("id not in (select distinct vehicle_journey_id from time_tables_vehicle_journeys)").clean!
    end
  end
# CLEANUPS THAT CAN BE TRIGGERED PROGRAMATICALLY
CLEANUPS THAT CAN BE TRIGGERED PROGRAMATICALLY
CLEANUPS THAT CAN BE TRIGGERED PROGRAMATICALLY
def clean_unassociated_vehicle_journeys
    Chouette::Benchmark.measure 'clean_unassociated_vehicle_journeys' do
      Chouette::VehicleJourney.where("id not in (select distinct vehicle_journey_id from time_tables_vehicle_journeys)").clean!
    end
  end
def clean_unassociated_vehicle_journeys Chouette :: Benchmark . measure 'clean_unassociated_vehicle_journeys' do Chouette :: VehicleJourney . where ( "id not in (select distinct vehicle_journey_id from time_tables_vehicle_journeys)" ) . clean! end end
CLEANUPS THAT CAN BE TRIGGERED PROGRAMATICALLY
CLEANUPS THAT CAN BE TRIGGERED PROGRAMATICALLY