Make sure we clear the tags and segments for a way when it is deleted.

Also remove some redundant setting of timestamps that will be overwritten
by the model when saving.
This commit is contained in:
Tom Hughes 2007-06-27 23:44:40 +00:00
parent 97d5d1d385
commit 7901811752
3 changed files with 5 additions and 7 deletions

View file

@ -1,7 +1,7 @@
class SegmentController < ApplicationController
require 'xml/libxml'
before_filter :authorize, :only => [:create, :update, :destroy]
before_filter :authorize, :only => [:create, :update, :delete]
after_filter :compress_output
def create
@ -61,7 +61,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