Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Fix bug w/ viewing non-live trips
Browse files Browse the repository at this point in the history
  • Loading branch information
rofreg committed Dec 6, 2016
1 parent 644ea70 commit 698ad24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class RiptaApp < Sinatra::Application
@vehicle_position = GTFS::Realtime::VehiclePosition.where(trip_id: @trip.id).first
@trip_update = GTFS::Realtime::TripUpdate.where(trip_id: @trip.id).first
@stop_time_updates = GTFS::Realtime::StopTimeUpdate.where(trip_update_id: @trip_update.id) if @trip_update
@delay = (@stop_time_updates.first.arrival_delay || @stop_time_updates.first.departure_delay) if @stop_time_updates.any?
@delay = (@stop_time_updates.first.arrival_delay || @stop_time_updates.first.departure_delay) if @stop_time_updates&.any?

erb :trip, layout: :default
end
Expand Down

0 comments on commit 698ad24

Please sign in to comment.