Fix MapLocation json_data to return mappable ids

Until we correctly make MapLocation relation with mappables a polymorphic
one... we'll need to return the investment_id and proposal_id values.

Right now it was returning the MapLocation ID, and the JS was making a
call searching for an Investment with the MapLocation ID... sometimes
finding a record with same ID but totally NOT the one associated to the
MapLocation.
This commit is contained in:
Bertocq
2018-04-25 19:18:18 +02:00
parent 26f72e437b
commit a44c830cd4
2 changed files with 3 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ App.Map =
for i in addMarkerInvestments
if App.Map.validCoordinates(i)
marker = createMarker(i.lat, i.long)
marker.options['id'] = i.id
marker.options['id'] = i.investment_id
marker.on 'click', openMarkerPopup