X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/bee38e63a3cf9083d5bf38e8bbfbac62f9a6a9d1..3bd92c16704823e79ac61f27d05c1a9be52858f5:/app/models/way.rb diff --git a/app/models/way.rb b/app/models/way.rb index 1fe628171..2c9ce9f72 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -49,9 +49,10 @@ class Way < ActiveRecord::Base # Find a way given it's ID, and in a single SQL call also grab its nodes # + # You can't pull in all the tags too unless we put a sequence_id on the way_tags table and have a multipart key def self.find_eager(id) - way = Way.find(id, :include => {:way_nodes => :node}) + way = Way.find(id, :include => [:way_tags, {:way_nodes => :node}]) end # Find a way given it's ID, and in a single SQL call also grab its nodes and tags