spec/support/models.rb in closure_tree-2.0.0 vs spec/support/models.rb in closure_tree-3.0.0

- old
+ new

@@ -1,14 +1,14 @@ class Tag < ActiveRecord::Base acts_as_tree :dependent => :destroy - before_destroy :create_tag + before_destroy :add_destroyed_tag def to_s name end - def create_tag + def add_destroyed_tag # Proof for the tests that the destroy rather than the delete method was called: DestroyedTag.create(:name => name) end end @@ -22,5 +22,21 @@ def to_s email end end + +class Label < ActiveRecord::Base + acts_as_tree + def to_s + "#{self.class}: #{name}" + end +end + +class EventLabel < Label +end + +class DateLabel < Label +end + +class DirectoryLabel < Label +end \ No newline at end of file