X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/b56f57ec43dfefa4171dc0cefe26d9e75d4ca2bc..797cbaab1ef4b842f3b57bb46c29dea61b4c7e3a:/app/controllers/relation_controller.rb diff --git a/app/controllers/relation_controller.rb b/app/controllers/relation_controller.rb index 7ce58dae6..cdd1d34d6 100644 --- a/app/controllers/relation_controller.rb +++ b/app/controllers/relation_controller.rb @@ -180,12 +180,12 @@ class RelationController < ApplicationController end def relations_for_object(objtype) - relationids = RelationMember.find(:all, :conditions => ['member_type=? and member_id=?', objtype, params[:id]]).collect { |ws| ws.id }.uniq + relationids = RelationMember.find(:all, :conditions => ['member_type=? and member_id=?', objtype, params[:id]]).collect { |ws| ws.id[0] }.uniq doc = OSM::API.new.get_xml_doc Relation.find(relationids).each do |relation| - doc.root << relation.to_xml_node + doc.root << relation.to_xml_node if relation.visible end render :text => doc.to_s, :content_type => "text/xml"