]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
Merge branch 'master' into feature/add-communities-page
[rails.git] / app / models / node.rb
index 2ae62d68482701ea48b933fa05fa837ab1d125db..ad4318487b722839771e0a94b9cfc62561a966bd 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
@@ -236,7 +236,7 @@ class Node < ApplicationRecord
   private
 
   def save_with_history!
-    t = Time.now.getutc
+    t = Time.now.utc
 
     self.version += 1
     self.timestamp = t