From cb0564d4d7d35c8a43e166b68d8c7dc94341fc9d Mon Sep 17 00:00:00 2001 From: Zog Date: Thu, 11 Jan 2018 14:37:14 +0100 Subject: Refs #5551 @1.5h; Implement Custom fields edition RBD: implement the same in the creation modal --- app/models/chouette/vehicle_journey.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models/chouette') diff --git a/app/models/chouette/vehicle_journey.rb b/app/models/chouette/vehicle_journey.rb index 32f3cb731..3bd83f83e 100644 --- a/app/models/chouette/vehicle_journey.rb +++ b/app/models/chouette/vehicle_journey.rb @@ -218,6 +218,7 @@ module Chouette ['company', 'journey_pattern'].map do |association| attrs["#{association}_id"] = item[association]['id'] if item[association] end + attrs["custom_field_values"] = Hash[*(item["custom_fields"] || {}).map{|k, v| [k, v["value"]]}.flatten] attrs end -- cgit v1.2.3