Eager load nodes and node tags for the way when doing a getway call.

This commit is contained in:
Tom Hughes 2009-04-28 15:55:54 +00:00
parent bcbbf1944b
commit 4de6006567

View file

@ -266,7 +266,7 @@ class AmfController < ApplicationController
# then rails only seems to return the first copy of a node when a
# way includes a node more than once
begin
way = Way.find(wayid)
way = Way.find(wayid, :include => { :nodes => :node_tags })
rescue ActiveRecord::RecordNotFound
return [wayid,[],{}]
end