spec/support/models.rb in closure_tree-3.7.1 vs spec/support/models.rb in closure_tree-3.7.2

- old
+ new

@@ -1,5 +1,17 @@ +require 'uuidtools' + +class Node < ActiveRecord::Base + acts_as_tree :dependent => :destroy + before_create :generate_uuid + attr_accessible :name + + def generate_uuid + self.id = UUIDTools::UUID.random_create.to_s + end +end + class Tag < ActiveRecord::Base acts_as_tree :dependent => :destroy, :order => "name" before_destroy :add_destroyed_tag attr_accessible :name @@ -58,6 +70,6 @@ class DirectoryLabel < Label end class CuisineType < ActiveRecord::Base acts_as_tree -end \ No newline at end of file +end