]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_way.rb
further work on 0.6 history (not quite complete yet)
[rails.git] / app / models / old_way.rb
index da9cf0697104ecea39d12db601d17f26e1be8cec..df2ab3fa4805664f34ebc7eb3eb4d33f4548a669 100644 (file)
@@ -134,10 +134,10 @@ class OldWay < ActiveRecord::Base
        points
   end
   
-  def get_nodes_revert
+  def get_nodes_revert(timestamp)
     points=[]
     self.nds.each do |n|
-      oldnode=OldNode.find(:first, :conditions=>['id=? AND timestamp<=?',n,self.timestamp], :order=>"timestamp DESC")
+      oldnode=OldNode.find(:first, :conditions=>['id=? AND timestamp<=?',n,timestamp], :order=>"timestamp DESC")
       curnode=Node.find(n)
       id=n; v=curnode.visible ? 1 : 0
       if oldnode.lat!=curnode.lat or oldnode.lon!=curnode.lon or oldnode.tags!=curnode.tags then