aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Peignier2017-12-28 08:06:15 +0100
committerAlban Peignier2017-12-28 08:06:15 +0100
commit0c61125db6b3ab082e007a510a92bdfa742894bd (patch)
tree77bfe2bdd7c2a40e7c2628dbd86ccec92727974b
parent1d9e20a087a77ba3aac6bb64291797357286acc7 (diff)
downloadchouette-core-0c61125db6b3ab082e007a510a92bdfa742894bd.tar.bz2
Use node instead of attributes in vehicle_journeys#show. Refs #5432
-rw-r--r--app/views/vehicle_journeys/show.rabl6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/vehicle_journeys/show.rabl b/app/views/vehicle_journeys/show.rabl
index b35ae65f9..a07f09309 100644
--- a/app/views/vehicle_journeys/show.rabl
+++ b/app/views/vehicle_journeys/show.rabl
@@ -40,6 +40,10 @@ end
child(:vehicle_journey_at_stops_matrix, :object_root => false) do |vehicle_stops|
node do |vehicle_stop|
+ [:id, :connecting_service_id, :boarding_alighting_possibility].map do |att|
+ node(att) { vehicle_stop.send(att) ? vehicle_stop.send(att) : nil }
+ end
+
node(:dummy) { vehicle_stop.dummy }
node(:stop_area_object_id) do
@@ -55,8 +59,6 @@ child(:vehicle_journey_at_stops_matrix, :object_root => false) do |vehicle_stops
vehicle_stop.stop_point.stop_area.city_name
end
- attributes :id, :connecting_service_id, :boarding_alighting_possibility
-
[:arrival_time, :departure_time].each do |att|
node(att) do |vs|
{