diff --git a/app/models/decidim/ideas/idea.rb b/app/models/decidim/ideas/idea.rb index 80ce5c3..957d6b7 100644 --- a/app/models/decidim/ideas/idea.rb +++ b/app/models/decidim/ideas/idea.rb @@ -159,14 +159,11 @@ def self.geocoded_data_for(component) end def self.area_scope_coordinates_for(component) - component.settings.area_scope_coordinates.to_h do |scope_id, coords| + component.settings.area_scope_coordinates.index_with do |(_scope_id, coords)| latlng = coords.split(",") next if latlng.length < 2 - [ - scope_id.to_s.to_i, - [latlng[0].to_f, latlng[1].to_f] - ] + [latlng[0].to_f, latlng[1].to_f] end.compact end