]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/relation_controller.rb
Rename all ID columns that aren't unique
[rails.git] / app / controllers / relation_controller.rb
index 0c2cccd11ee847cf46ff8af315bb6c1e9b316301..10328aae47c907bb2d490e46901e4a1acd887253 100644 (file)
@@ -157,7 +157,7 @@ class RelationController < ApplicationController
   end
 
   def relations_for_object(objtype)
   end
 
   def relations_for_object(objtype)
-    relationids = RelationMember.where(:member_type => objtype, :member_id => params[:id]).collect { |ws| ws.id[0] }.uniq
+    relationids = RelationMember.where(:member_type => objtype, :member_id => params[:id]).collect { |ws| ws.relation_id }.uniq
 
     doc = OSM::API.new.get_xml_doc
 
 
     doc = OSM::API.new.get_xml_doc