aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-11 03:25:59 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-11 03:25:59 +0000
commitea0975a20b0752bfbfcafe8eefd98f7fe9bcd386 (patch)
treee3e86c952dc00ee6220d08b3b1beb94056fb5293 /activerecord/test/fixtures
parent11f4d28344e2b10de08a3dafdf1b0c5de34325c7 (diff)
downloadrails-ea0975a20b0752bfbfcafe8eefd98f7fe9bcd386.tar.gz
rails-ea0975a20b0752bfbfcafe8eefd98f7fe9bcd386.tar.bz2
rails-ea0975a20b0752bfbfcafe8eefd98f7fe9bcd386.zip
Moved acts_as_tree into a plugin of the same name on the official Rails svn (closes #9514) [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7454 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r--activerecord/test/fixtures/mixin.rb73
-rw-r--r--activerecord/test/fixtures/mixins.yml63
2 files changed, 0 insertions, 136 deletions
diff --git a/activerecord/test/fixtures/mixin.rb b/activerecord/test/fixtures/mixin.rb
deleted file mode 100644
index 358dde1ae1..0000000000
--- a/activerecord/test/fixtures/mixin.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-class Mixin < ActiveRecord::Base
-
-end
-
-class TreeMixin < Mixin
- acts_as_tree :foreign_key => "parent_id", :order => "id"
-end
-
-class TreeMixinWithoutOrder < Mixin
- acts_as_tree :foreign_key => "parent_id"
-end
-
-class RecursivelyCascadedTreeMixin < Mixin
- acts_as_tree :foreign_key => "parent_id"
- has_one :first_child, :class_name => 'RecursivelyCascadedTreeMixin', :foreign_key => :parent_id
-end
-
-
-class NestedSet < Mixin
- acts_as_nested_set :scope => "root_id IS NULL"
-
- def self.table_name() "mixins" end
-end
-
-class NestedSetWithStringScope < Mixin
- acts_as_nested_set :scope => 'root_id = #{root_id}'
-
- def self.table_name() "mixins" end
-end
-
-class NestedSetWithSymbolScope < Mixin
- acts_as_nested_set :scope => :root
-
- def self.table_name() "mixins" end
-end
-
-class NestedSetSuperclass < Mixin
- acts_as_nested_set :scope => :root
-
- def self.table_name() "mixins" end
-end
-
-class NestedSetSubclass < NestedSetSuperclass
-
-end
-
-class NestedSet < Mixin
- acts_as_nested_set :scope => "root_id IS NULL"
-
- def self.table_name() "mixins" end
-end
-
-class NestedSetWithStringScope < Mixin
- acts_as_nested_set :scope => 'root_id = #{root_id}'
-
- def self.table_name() "mixins" end
-end
-
-class NestedSetWithSymbolScope < Mixin
- acts_as_nested_set :scope => :root
-
- def self.table_name() "mixins" end
-end
-
-class NestedSetSuperclass < Mixin
- acts_as_nested_set :scope => :root
-
- def self.table_name() "mixins" end
-end
-
-class NestedSetSubclass < NestedSetSuperclass
-
-end
diff --git a/activerecord/test/fixtures/mixins.yml b/activerecord/test/fixtures/mixins.yml
index c79ff41070..0f60e92c2f 100644
--- a/activerecord/test/fixtures/mixins.yml
+++ b/activerecord/test/fixtures/mixins.yml
@@ -1,71 +1,8 @@
-# tree mixins
-tree_1:
- id: 1001
- type: TreeMixin
- parent_id:
-
-tree_2:
- id: 1002
- type: TreeMixin
- parent_id: 1001
-
-tree_3:
- id: 1003
- type: TreeMixin
- parent_id: 1002
-
-tree_4:
- id: 1004
- type: TreeMixin
- parent_id: 1001
-
-tree2_1:
- id: 1005
- type: TreeMixin
- parent_id:
-
-tree3_1:
- id: 1006
- type: TreeMixin
- parent_id:
-
-tree_without_order_1:
- id: 1101
- type: TreeMixinWithoutOrder
- parent_id:
-
-tree_without_order_2:
- id: 1100
- type: TreeMixinWithoutOrder
- parent_id:
-
-recursively_cascaded_tree_1:
- id: 5005
- type: RecursivelyCascadedTreeMixin
- parent_id:
-
-recursively_cascaded_tree_2:
- id: 5006
- type: RecursivelyCascadedTreeMixin
- parent_id: 5005
-
-recursively_cascaded_tree_3:
- id: 5007
- type: RecursivelyCascadedTreeMixin
- parent_id: 5006
-
-recursively_cascaded_tree_4:
- id: 5008
- type: RecursivelyCascadedTreeMixin
- parent_id: 5007
-
-
# Nested set mixins
<% (1..10).each do |counter| %>
set_<%= counter %>:
id: <%= counter+3000 %>
- type: NestedSet
<% end %>
# Big old set