aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-01-11 17:06:18 +0100
committerZog2018-01-11 17:06:18 +0100
commit93ca7a94e8cb7845e36fab4eb953bf9f4461551d (patch)
treeb54c123eec55fdf7fe203f377303b62ee60a43f2
parent6be4f648ed5f200af7dbe8843d24361c8c9f2b63 (diff)
downloadchouette-core-93ca7a94e8cb7845e36fab4eb953bf9f4461551d.tar.bz2
Fix VJ creation with full schedule when JourneyPatterns are not loaded through an ajax callfix-vj-creation-with-full-schedule
-rw-r--r--app/controllers/vehicle_journeys_controller.rb2
-rw-r--r--app/views/api/v1/journey_patterns/show.rabl1
2 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/vehicle_journeys_controller.rb b/app/controllers/vehicle_journeys_controller.rb
index 565cccec8..e3e067782 100644
--- a/app/controllers/vehicle_journeys_controller.rb
+++ b/app/controllers/vehicle_journeys_controller.rb
@@ -186,6 +186,8 @@ class VehicleJourneysController < ChouetteController
published_name: item.published_name,
object_id: item.objectid,
short_id: item.get_objectid.short_id,
+ full_schedule: item.full_schedule?,
+ costs: item.costs,
stop_area_short_descriptions: item.stop_areas.map do |stop|
{
stop_area_short_description: {
diff --git a/app/views/api/v1/journey_patterns/show.rabl b/app/views/api/v1/journey_patterns/show.rabl
index cdda2d1cd..aac66b6f3 100644
--- a/app/views/api/v1/journey_patterns/show.rabl
+++ b/app/views/api/v1/journey_patterns/show.rabl
@@ -12,6 +12,7 @@ end
if has_feature? :costs_in_journey_patterns
attribute :costs
end
+
node(:route_short_description) do |journey_pattern|
partial("api/v1/routes/short_description", :object => journey_pattern.route)
end