]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Move in_world? to GeoRecord model and correct comment.
[rails.git] / app / models / way.rb
index 121dff8bd4cece70358ecf3f2a7974658b5d5aa7..f95037ea13466832349bf5f261a1a09e21c0d2ba 100644 (file)
@@ -3,6 +3,7 @@ class Way < ActiveRecord::Base
 
   belongs_to :user
 
+  has_many :nodes, :through => :way_nodes, :order => 'sequence_id'
   has_many :way_nodes, :foreign_key => 'id', :order => 'sequence_id'
   has_many :way_tags, :foreign_key => 'id'
 
@@ -241,7 +242,7 @@ class Way < ActiveRecord::Base
     # update the visibility etc on the current nodes
     update_time = Time.now()
     
-    Node.update(node_ids_to_delete, {:user_id = user.id, :timestamp => update_time, :visibility => false})
+    Node.update(node_ids_to_delete, {:user_id => user.id, :timestamp => update_time, :visibility => false})
 
     # create old nodes