]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/relation.rb
Bump eslint from 8.56.0 to 8.57.0
[rails.git] / app / models / relation.rb
index 0adf1012d67e1b03f00595c44c06c317cd7ada45..0a4a660a6fa536c52a025a4b337c521e85ab59be 100644 (file)
@@ -27,9 +27,9 @@ class Relation < ApplicationRecord
 
   belongs_to :changeset
 
-  has_many :old_relations, -> { order(:version) }
+  has_many :old_relations, -> { order(:version) }, :inverse_of => :current_relation
 
-  has_many :relation_members, -> { order(:sequence_id) }
+  has_many :relation_members, -> { order(:sequence_id) }, :inverse_of => :relation
   has_many :relation_tags
 
   has_many :containing_relation_members, :class_name => "RelationMember", :as => :member
@@ -263,7 +263,7 @@ class Relation < ApplicationRecord
   private
 
   def save_with_history!
-    t = Time.now.getutc
+    t = Time.now.utc
 
     self.version += 1
     self.timestamp = t