From c8a2e2ce194d3d051bb96522c40c4d34392bdf8e Mon Sep 17 00:00:00 2001 From: Zog Date: Wed, 10 Jan 2018 18:24:54 +0100 Subject: Refs #5535 @2H; Automatically fill VJs tilmes when possible --- app/views/api/v1/journey_patterns/show.rabl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'app/views/api') diff --git a/app/views/api/v1/journey_patterns/show.rabl b/app/views/api/v1/journey_patterns/show.rabl index 815b1cf0b..ba63a35c7 100644 --- a/app/views/api/v1/journey_patterns/show.rabl +++ b/app/views/api/v1/journey_patterns/show.rabl @@ -5,13 +5,17 @@ extends "api/v1/trident_objects/show" attributes attr, :unless => lambda { |m| m.send( attr).nil?} end +node :full_schedule do |journey_pattern| + journey_pattern.full_schedule? +end + if has_feature? :costs_in_journey_patterns attribute :costs + node(:route_short_description) do |journey_pattern| + partial("api/v1/routes/short_description", :object => journey_pattern.route) + end end -node(:route_short_description) do |journey_pattern| - partial("api/v1/routes/short_description", :object => journey_pattern.route) -end node(:vehicle_journey_object_ids) do |journey_pattern| journey_pattern.vehicle_journeys.pluck(:objectid) -- cgit v1.2.3