X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dcad29dad0d29e22ffa0c34a8d9b43cbf5d64f12..50ba6446022079b18326ab14a05ef322ee180100:/app/controllers/segment_controller.rb?ds=sidebyside diff --git a/app/controllers/segment_controller.rb b/app/controllers/segment_controller.rb index 31738ce13..42e939a65 100644 --- a/app/controllers/segment_controller.rb +++ b/app/controllers/segment_controller.rb @@ -1,7 +1,9 @@ class SegmentController < ApplicationController require 'xml/libxml' - before_filter :authorize, :only => [:create, :update, :destroy] + session :off + before_filter :authorize, :only => [:create, :update, :delete] + before_filter :check_availability, :only => [:create, :update, :delete] after_filter :compress_output def create @@ -61,7 +63,6 @@ class SegmentController < ApplicationController elsif !new_segment.preconditions_ok? render :nothing => true, :status => :precondition_failed else - segment.timestamp = Time.now segment.user_id = @user.id segment.node_a = new_segment.node_a segment.node_b = new_segment.node_b