aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/routes_helper.rb
diff options
context:
space:
mode:
authorThomas Haddad2016-11-30 17:13:39 +0100
committerThomas Haddad2016-11-30 17:14:57 +0100
commitadee9a89a50bad9199e1c3dc4b3b355844439d2e (patch)
tree9fa32f64249be98e2b63ade9014daf4ba1aef95d /app/helpers/routes_helper.rb
parentd9138724dbaac334cfb8ed8343016805c091ebc7 (diff)
downloadchouette-core-adee9a89a50bad9199e1c3dc4b3b355844439d2e.tar.bz2
Fix user_objectid correctly retrieved from route_json_for_edit
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.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/routes_helper.rb b/app/helpers/routes_helper.rb
index d4cadcd5a..b55308eb8 100644
--- a/app/helpers/routes_helper.rb
+++ b/app/helpers/routes_helper.rb
@@ -15,9 +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", "user_objectid")
+ stop_area_attributes = stop_point.stop_area.attributes.slice("name","city_name", "zip_code")
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)
+ 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
end