X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3065af398d20b9c8a1270075780dd66003f0d894..152cb13a02dfcb2966b8a9b29382f84a99a23a69:/app/models/way.rb diff --git a/app/models/way.rb b/app/models/way.rb index 7c29a44b3..3b3f92432 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -27,7 +27,7 @@ class Way < ActiveRecord::Base doc = p.parse doc.find('//osm/way').each do |pt| - return Way.from_xml_node(pt, create) + return Way.from_xml_node(pt, create) end rescue return nil @@ -233,6 +233,10 @@ class Way < ActiveRecord::Base # update and commit the bounding box, now that way nodes # have been updated and we're in a transaction. changeset.update_bbox!(bbox) unless nodes.empty? + + # tell the changeset we updated one element only + changeset.add_changes! 1 + changeset.save! end end