]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
Add inverse_of to relationships that can't detect it automatically
[rails.git] / app / models / node.rb
index 3214564c8e4fbf7c1eb15e75f953e9f187869c41..f6f0f258e4d3e9ef7eb10324cdd72858b7e3c4cd 100644 (file)
@@ -32,7 +32,7 @@ class Node < ApplicationRecord
 
   belongs_to :changeset
 
-  has_many :old_nodes, -> { order(:version) }
+  has_many :old_nodes, -> { order(:version) }, :inverse_of => :current_node
 
   has_many :way_nodes
   has_many :ways, :through => :way_nodes