aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/vehicle_journeys_controller.rb
diff options
context:
space:
mode:
authorThomas Haddad2017-05-31 09:46:59 +0200
committerThomas Haddad2017-05-31 09:47:29 +0200
commit6982c9e3cb7ba9049c68c4783991a47c65c5d536 (patch)
tree1e709460a24ca30e2751e7ad78bb33e9931ef2f8 /app/controllers/vehicle_journeys_controller.rb
parent19b000d64bf57e345d80fbf9a2c69aeef11fdee1 (diff)
downloadchouette-core-6982c9e3cb7ba9049c68c4783991a47c65c5d536.tar.bz2
Refs #3612: Fill selectedJP in create modal with its stoparea ids
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Diffstat (limited to 'app/controllers/vehicle_journeys_controller.rb')
-rw-r--r--app/controllers/vehicle_journeys_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/vehicle_journeys_controller.rb b/app/controllers/vehicle_journeys_controller.rb
index 71787ba78..b48cae2e9 100644
--- a/app/controllers/vehicle_journeys_controller.rb
+++ b/app/controllers/vehicle_journeys_controller.rb
@@ -64,7 +64,10 @@ class VehicleJourneysController < ChouetteController
}
end
- @jp_origin = Chouette::JourneyPattern.find_by(objectid: params[:jp])
+ if params[:jp]
+ @jp_origin = Chouette::JourneyPattern.find_by(objectid: params[:jp])
+ @jp_origin_stop_points = @jp_origin.stop_points
+ end
index! do
if collection.out_of_bounds?