diff options
| -rw-r--r-- | app/models/chouette/vehicle_journey_at_stops_day_offset.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/models/chouette/vehicle_journey_at_stops_day_offset.rb b/app/models/chouette/vehicle_journey_at_stops_day_offset.rb index 490b22499..71eb46b19 100644 --- a/app/models/chouette/vehicle_journey_at_stops_day_offset.rb +++ b/app/models/chouette/vehicle_journey_at_stops_day_offset.rb @@ -4,8 +4,6 @@ module Chouette @at_stops = at_stops end - # def update - def calculate! start_date = @at_stops.first.arrival_time.to_date offset = 0 @@ -55,5 +53,16 @@ module Chouette previous_at_stop = at_stop end end + + def save + @at_stops.each do |at_stop| + at_stop.save + end + end + + def update + calculate! + save + end end end |
