diff options
| author | Thomas Haddad | 2017-03-20 12:28:14 +0100 |
|---|---|---|
| committer | Thomas Haddad | 2017-03-20 12:28:51 +0100 |
| commit | 531f4eb80fca4cd1902f34c79222dab7de5554c9 (patch) | |
| tree | 674a31ff5856a4c6a0cc2f283947098f7b160585 /app/helpers/routes_helper.rb | |
| parent | fa522151f9506de1adad4cc023b5477a7550a263 (diff) | |
| download | chouette-core-531f4eb80fca4cd1902f34c79222dab7de5554c9.tar.bz2 | |
Refs #2876: Add data in sidebar when olmap is toggled
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Diffstat (limited to 'app/helpers/routes_helper.rb')
| -rw-r--r-- | app/helpers/routes_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/routes_helper.rb b/app/helpers/routes_helper.rb index 40c1278f7..38d2a232f 100644 --- a/app/helpers/routes_helper.rb +++ b/app/helpers/routes_helper.rb @@ -15,7 +15,9 @@ module RoutesHelper def route_json_for_edit(route) route.stop_points.includes(:stop_area).map do |stop_point| - stop_area_attributes = stop_point.stop_area.attributes.slice("name","city_name", "zip_code", "registration_number", "longitude", "latitude") + stop_area_attributes = stop_point.stop_area.attributes.slice("name","city_name", "zip_code", "registration_number", "longitude", "latitude", "area_type") + stop_area_attributes["short_name"] = truncate(stop_area_attributes["name"], :length => 30) || "" + Rails.logger.debug(stop_area_attributes) stop_point_attributes = stop_point.attributes.slice("for_boarding","for_alighting") stop_area_attributes.merge(stop_point_attributes).merge(stoppoint_id: stop_point.id, stoparea_id: stop_point.stop_area.id).merge(user_objectid: stop_point.stop_area.user_objectid) end.to_json |
