From 0c61125db6b3ab082e007a510a92bdfa742894bd Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Thu, 28 Dec 2017 08:06:15 +0100 Subject: Use node instead of attributes in vehicle_journeys#show. Refs #5432 --- app/views/vehicle_journeys/show.rabl | 6 ++++-- 1 file 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| { -- cgit v1.2.3