From: Steve Coast Date: Thu, 7 Jun 2007 00:38:09 +0000 (+0000) Subject: fix based from TomH-Home X-Git-Tag: live~8974 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/c72f6a41827f49e2cffbb2b59a10ed1680a5dc6b fix based from TomH-Home --- diff --git a/app/models/trace.rb b/app/models/trace.rb index de9bda661..d44d71027 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -6,8 +6,8 @@ class Trace < ActiveRecord::Base validates_inclusion_of :inserted, :in => [ true, false] belongs_to :user - has_many :tags, :class_name => 'Tracetag', :foreign_key => 'gpx_id', :dependent => :destroy - has_many :points, :class_name => 'Tracepoint', :foreign_key => 'gpx_id', :dependent => :destroy + has_many :tags, :class_name => 'Tracetag', :foreign_key => 'gpx_id', :dependent => :delete_all + has_many :points, :class_name => 'Tracepoint', :foreign_key => 'gpx_id', :dependent => :delete_all def tagstring=(s) self.tags = s.split().collect {|tag|