From 339f4956b3adb8a9d43a024db69f4bc28e09e235 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 17 Apr 2005 09:52:12 +0000 Subject: Added acts_as_nested_set #1000 [wschenk] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1185 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/mixins.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'activerecord/test/fixtures/mixins.yml') diff --git a/activerecord/test/fixtures/mixins.yml b/activerecord/test/fixtures/mixins.yml index 49297cc241..9f8e1ee8de 100644 --- a/activerecord/test/fixtures/mixins.yml +++ b/activerecord/test/fixtures/mixins.yml @@ -28,3 +28,33 @@ list_<%= counter %>: type: ListMixin parent_id: 5 <% end %> + +# Nested set mixins + +<% (1..10).each do |counter| %> +set_<%= counter %>: + id: <%= counter+3000 %> + type: NestedSet +<% end %> + +# Big old set +<% +[[4001, 0, 1, 20], + [4002, 4001, 2, 7], + [4003, 4002, 3, 4], + [4004, 4002, 5, 6], + [4005, 4001, 8, 13], + [4006, 4005, 9, 10], + [4007, 4005, 11, 12], + [4008, 4001, 14, 19], + [4009, 4008, 15, 16], + [4010, 4008, 17, 18]].each do |set| %> +tree_<%= set[0] %>: + id: <%= set[0]%> + parent_id: <%= set[1]%> + type: NestedSetWithStringScope + lft: <%= set[2]%> + rgt: <%= set[3]%> + root_id: 42 + +<% end %> -- cgit v1.2.3