]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/segment_controller.rb
use render proc to write out results, see if that makes things faster
[rails.git] / app / controllers / segment_controller.rb
index 5ef11084cb795809fd3eb834a8c57fdac5d1d2b2..bc41b85a39a116a02dadebb660a344242603f0ba 100644 (file)
@@ -60,6 +60,7 @@ class SegmentController < ApplicationController
         if WaySegment.find(:first, :joins => "INNER JOIN current_ways ON current_ways.id = current_way_segments.id", :conditions => [ "current_ways.visible = 1 AND current_way_segments.segment_id = ?", segment.id ])
           render :nothing => true, :status => HTTP_PRECONDITION_FAILED
         else
         if WaySegment.find(:first, :joins => "INNER JOIN current_ways ON current_ways.id = current_way_segments.id", :conditions => [ "current_ways.visible = 1 AND current_way_segments.segment_id = ?", segment.id ])
           render :nothing => true, :status => HTTP_PRECONDITION_FAILED
         else
+          segment.user_id = @user.id
           segment.visible = 0
           segment.save_with_history
           render :nothing => true
           segment.visible = 0
           segment.save_with_history
           render :nothing => true