aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/api
diff options
context:
space:
mode:
authorcedricnjanga2017-07-27 16:57:25 +0200
committercedricnjanga2017-07-27 17:14:17 +0200
commit50cadba108d3811c6b1a15f669ab1314e724520f (patch)
tree440433c9a73b14473f3e340019a6e162989df1e7 /app/views/api
parented66fa64bcc20e1aba8212232c131b9eb25c638c (diff)
downloadchouette-core-50cadba108d3811c6b1a15f669ab1314e724520f.tar.bz2
Revert "Revert "Add short id in Ransack query for MissionSelect2""
This reverts commit e6e6047d9240ffb54fb1989f68c2a6a388b7e66e.
Diffstat (limited to 'app/views/api')
-rw-r--r--app/views/api/v1/journey_patterns/show.rabl8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/api/v1/journey_patterns/show.rabl b/app/views/api/v1/journey_patterns/show.rabl
index 21f25e480..7c3af52fc 100644
--- a/app/views/api/v1/journey_patterns/show.rabl
+++ b/app/views/api/v1/journey_patterns/show.rabl
@@ -5,6 +5,13 @@ extends "api/v1/trident_objects/show"
attributes attr, :unless => lambda { |m| m.send( attr).nil?}
end
+node do |jp|
+ {
+ short_id: jp.objectid.parts.try(:third)
+ }
+
+end
+
node(:route_short_description) do |journey_pattern|
partial("api/v1/routes/short_description", :object => journey_pattern.route)
end
@@ -18,4 +25,3 @@ child :stop_points => :stop_area_short_descriptions do |stop_points|
partial("api/v1/stop_areas/short_description", :object => stop_point.stop_area)
end
end
-