diff options
| author | Xinhui | 2017-02-27 15:09:15 +0100 |
|---|---|---|
| committer | Xinhui | 2017-02-27 15:09:15 +0100 |
| commit | c189fae82a6421832e3052ef75c51e37d8afa7a6 (patch) | |
| tree | 29d894073988dca0fd3989a71f77fb7ed7f00fce | |
| parent | 1c792aca74efd48c01fb3c6610158c09c8bb8516 (diff) | |
| download | chouette-core-c189fae82a6421832e3052ef75c51e37d8afa7a6.tar.bz2 | |
vehicle_journeys #index json format - journey_pattern data
| -rw-r--r-- | app/views/vehicle_journeys/show.rabl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/vehicle_journeys/show.rabl b/app/views/vehicle_journeys/show.rabl index 9dc1d6d40..91d552c4f 100644 --- a/app/views/vehicle_journeys/show.rabl +++ b/app/views/vehicle_journeys/show.rabl @@ -1,9 +1,13 @@ object @vehicle_journey -[ :objectid, :published_journey_name, :journey_pattern_id].each do |attr| +[ :objectid, :published_journey_name].each do |attr| attributes attr, :unless => lambda { |m| m.send( attr).nil?} end +child(:journey_pattern) do |journey_pattern| + attributes :id, :objectid, :name, :published_name +end + child(:time_tables, :object_root => false) do |time_tables| node do |tt| [:objectid, :comment].map do |att| |
