]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/node_controller.rb
Fix the data config, so that the development database is not the same as the test...
[rails.git] / app / controllers / node_controller.rb
index 03ae64f41939a4c9f4e4dcd92895a3ab33044b40..8e8c8446d1c66ef420a50ac10f028c53da4a17f1 100644 (file)
@@ -36,7 +36,7 @@ class NodeController < ApplicationController
   def read
     begin
       node = Node.find(params[:id])
-      if node.visible
+      if node.visible?
         response.headers['Last-Modified'] = node.timestamp.rfc822
         render :text => node.to_xml.to_s, :content_type => "text/xml"
        else
@@ -87,6 +87,11 @@ class NodeController < ApplicationController
   def delete
     begin
       node = Node.find(params[:id])
+      # FIXME we no longer care about the user, (or maybe we want to check
+      # that the user of the changeset is the same user as is making this
+      # little change?) we really care about the 
+      # changeset which must be open, and that the version that we have been
+      # given is the one that is currently stored in the database
       node.delete_with_history(@user)
 
       render :nothing => true