lib/easy_transilien/trip.rb in easy_transilien-0.0.8 vs lib/easy_transilien/trip.rb in easy_transilien-0.0.9

- old
+ new

@@ -52,12 +52,12 @@ aat = at at = last last = aat end - from_station = Station.find(from).first - to_station = Station.find(to).first + from_station = EasyTransilien::Station.find(from).first + to_station = EasyTransilien::Station.find(to).first raise "Can't find a Station from #{from.inspect}" unless from_station raise "Can't find a Station from #{to.inspect}" unless to_station routes = Transilien::Route.find(stop_area_external_code: {and: [from_station.external_code, to_station.external_code] }, check_order: 1) @@ -78,10 +78,10 @@ end.sort item.from_stop = item.stops.select { |ts| ts.station_external_code == from_station.external_code }.first item.to_stop = item.stops.select { |ts| ts.station_external_code == to_station.external_code }.first next if item.from_stop.nil? || item.to_stop.nil? # drop item if this journey doesn't deserve our from_stop or to_stop item.access_time = journey.access_time - item.ms_journey = journey + item.ms_journey = journey item.mission = journey.name item.start_time = item.from_stop.ms_stop.stop_time.time item.arrival_time = item.to_stop.ms_stop.stop_time.time trips << item