]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Remove conditions from delete_all
[rails.git] / app / models / way.rb
index 9877b8bb8ea2b8dcde7a26c3f93b599fb29f8904..9586094ff10951020aed5f27b2394bf201933303 100644 (file)
@@ -271,7 +271,7 @@ class Way < ActiveRecord::Base
       clone.save!
 
       tags = self.tags
-      WayTag.delete_all(:way_id => id)
+      WayTag.where(:way_id => id).delete_all
       tags.each do |k, v|
         tag = WayTag.new
         tag.way_id = id
@@ -281,7 +281,7 @@ class Way < ActiveRecord::Base
       end
 
       nds = self.nds
-      WayNode.delete_all(:way_id => id)
+      WayNode.where(:way_id => id).delete_all
       sequence = 1
       nds.each do |n|
         nd = WayNode.new