]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/relation_controller.rb
Refactor AMF respone streaming
[rails.git] / app / controllers / relation_controller.rb
index db68847e54a274819d2d5dc9e0c8ab8e99d72e71..10328aae47c907bb2d490e46901e4a1acd887253 100644 (file)
@@ -26,7 +26,7 @@ class RelationController < ApplicationController
 
   def read
     relation = Relation.find(params[:id])
-    response.headers['Last-Modified'] = relation.timestamp.rfc822
+    response.last_modified = relation.timestamp
     if relation.visible
       render :text => relation.to_xml.to_s, :content_type => "text/xml"
     else
@@ -157,7 +157,7 @@ class RelationController < ApplicationController
   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