From: Tom Hughes Date: Tue, 28 Apr 2009 15:55:54 +0000 (+0000) Subject: Eager load nodes and node tags for the way when doing a getway call. X-Git-Tag: live~7500 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/4de6006567ccff573277c9fcfbf9cb3d6bb83a63 Eager load nodes and node tags for the way when doing a getway call. --- diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index d88c5ac19..900439721 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -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