From: Tom Hughes Date: Sat, 23 Jun 2007 23:06:48 +0000 (+0000) Subject: Make sure the associations with segments and old ways are properly ordered. X-Git-Tag: live~8335 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/c184b20f9f39ca52eac198f6154b42ee253b50a2 Make sure the associations with segments and old ways are properly ordered. --- diff --git a/app/models/way.rb b/app/models/way.rb index 5a26e2216..9658a9929 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -3,10 +3,10 @@ class Way < ActiveRecord::Base belongs_to :user - has_many :way_segments, :foreign_key => 'id' + has_many :way_segments, :foreign_key => 'id', :order => 'sequence_id' has_many :way_tags, :foreign_key => 'id' - has_many :old_ways, :foreign_key => :id + has_many :old_ways, :foreign_key => 'id', :order => 'version' set_table_name 'current_ways'