]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/relation_controller.rb
Log any session that is reset due to a username mismatch
[rails.git] / app / controllers / relation_controller.rb
index 0c2cccd11ee847cf46ff8af315bb6c1e9b316301..0b989d11e5fc21b8ba5dff32c55f3e6262698c04 100644 (file)
@@ -1,6 +1,7 @@
 class RelationController < ApplicationController
   require 'xml/libxml'
 
+  skip_before_filter :verify_authenticity_token
   before_filter :authorize, :only => [:create, :update, :delete]
   before_filter :require_allow_write_api, :only => [:create, :update, :delete]
   before_filter :require_public_data, :only => [:create, :update, :delete]
@@ -157,7 +158,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