Correctly record which user deleted an object.
[rails.git] / app / controllers / node_controller.rb
index f2a3ce3291cd48e2f7203d5457eb742fbb150a4e..6815470b8f19771599266e906b6e0da1fd88fcf5 100644 (file)
@@ -58,6 +58,7 @@ class NodeController < ApplicationController
         if Segment.find(:first, :conditions => [ "visible = 1 and (node_a = ? or node_b = ?)", node.id, node.id])
           render :nothing => true, :status => HTTP_PRECONDITION_FAILED
         else
+          node.user_id = @user.id
           node.visible = 0
           node.save_with_history
           render :nothing => true