X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/73426ea3838a2f92f5b766b51e017d529c456471..c3a14b195b9be06e653d4c362be862dd53edd704:/app/models/way.rb?ds=sidebyside diff --git a/app/models/way.rb b/app/models/way.rb index 767289d58..b11c225dd 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -27,9 +27,9 @@ class Way < ApplicationRecord belongs_to :changeset - has_many :old_ways, -> { order(:version) } + has_many :old_ways, -> { order(:version) }, :inverse_of => :current_way - has_many :way_nodes, -> { order(:sequence_id) } + has_many :way_nodes, -> { order(:sequence_id) }, :inverse_of => :way has_many :nodes, :through => :way_nodes has_many :way_tags @@ -227,7 +227,7 @@ class Way < ApplicationRecord private def save_with_history! - t = Time.now.getutc + t = Time.now.utc self.version += 1 self.timestamp = t