aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorXinhui2017-05-12 15:33:32 +0200
committerXinhui2017-05-12 15:33:32 +0200
commit6097f648e611956d8ef0e7c6c358f962e6a6d1f7 (patch)
tree165d472cbfc358e07f6cc86972dadfb54264ab20 /app
parentce44691bb446cc5e48accc58ad0613a511f10431 (diff)
downloadchouette-core-6097f648e611956d8ef0e7c6c358f962e6a6d1f7.tar.bz2
Edit vehicle_journeys/show json format
Refs #3356
Diffstat (limited to 'app')
-rw-r--r--app/models/chouette/vehicle_journey.rb4
-rw-r--r--app/views/vehicle_journeys/show.rabl2
2 files changed, 2 insertions, 4 deletions
diff --git a/app/models/chouette/vehicle_journey.rb b/app/models/chouette/vehicle_journey.rb
index 297e462f0..c25978ab1 100644
--- a/app/models/chouette/vehicle_journey.rb
+++ b/app/models/chouette/vehicle_journey.rb
@@ -51,9 +51,7 @@ module Chouette
at_stops = self.vehicle_journey_at_stops.to_a.dup
(route.stop_points.map(&:id) - at_stops.map(&:stop_point_id)).each do |id|
# Set stop_point id for fake vjas with no departure time yep.
- params = {}
- params[:stop_point_id] = id if journey_pattern.stop_points.map(&:id).include?(id)
- at_stops.insert(route.stop_points.map(&:id).index(id), Chouette::VehicleJourneyAtStop.new(params))
+ at_stops.insert(route.stop_points.map(&:id).index(id), Chouette::VehicleJourneyAtStop.new(stop_point_id: id))
end
at_stops
end
diff --git a/app/views/vehicle_journeys/show.rabl b/app/views/vehicle_journeys/show.rabl
index 7db9b531d..1ef9bc6b5 100644
--- a/app/views/vehicle_journeys/show.rabl
+++ b/app/views/vehicle_journeys/show.rabl
@@ -31,7 +31,7 @@ end
child(:vehicle_journey_at_stops_matrix, :object_root => false) do |vehicle_stops|
node do |vehicle_stop|
- node(:dummy) { !vehicle_stop.stop_point_id? }
+ node(:dummy) { !vehicle_stop.id? }
node(:stop_area_object_id) do
vehicle_stop.stop_point ? vehicle_stop.stop_point.stop_area.objectid : nil
end