2004-12-19 08:01:47 -05:00
|
|
|
# tree mixins
|
|
|
|
tree_1:
|
2004-12-22 09:14:45 -05:00
|
|
|
id: 1001
|
2004-12-19 08:01:47 -05:00
|
|
|
type: TreeMixin
|
2005-09-09 04:01:44 -04:00
|
|
|
parent_id:
|
2004-12-14 19:46:26 -05:00
|
|
|
|
2004-12-19 08:01:47 -05:00
|
|
|
tree_2:
|
2004-12-22 09:14:45 -05:00
|
|
|
id: 1002
|
2004-12-19 08:01:47 -05:00
|
|
|
type: TreeMixin
|
2004-12-22 09:14:45 -05:00
|
|
|
parent_id: 1001
|
2004-12-14 19:46:26 -05:00
|
|
|
|
2004-12-19 08:01:47 -05:00
|
|
|
tree_3:
|
2004-12-22 09:14:45 -05:00
|
|
|
id: 1003
|
2004-12-19 08:01:47 -05:00
|
|
|
type: TreeMixin
|
2004-12-22 09:14:45 -05:00
|
|
|
parent_id: 1002
|
2004-12-19 08:01:47 -05:00
|
|
|
|
|
|
|
tree_4:
|
2004-12-22 09:14:45 -05:00
|
|
|
id: 1004
|
2004-12-19 08:01:47 -05:00
|
|
|
type: TreeMixin
|
2004-12-22 09:14:45 -05:00
|
|
|
parent_id: 1001
|
2005-09-09 04:01:44 -04:00
|
|
|
|
|
|
|
tree2_1:
|
|
|
|
id: 1005
|
|
|
|
type: TreeMixin
|
|
|
|
parent_id:
|
|
|
|
|
|
|
|
tree3_1:
|
|
|
|
id: 1006
|
|
|
|
type: TreeMixin
|
|
|
|
parent_id:
|
2005-11-09 07:50:35 -05:00
|
|
|
|
|
|
|
tree_without_order_1:
|
|
|
|
id: 1101
|
|
|
|
type: TreeMixinWithoutOrder
|
|
|
|
parent_id:
|
|
|
|
|
|
|
|
tree_without_order_2:
|
|
|
|
id: 1100
|
|
|
|
type: TreeMixinWithoutOrder
|
|
|
|
parent_id:
|
|
|
|
|
2004-12-19 08:01:47 -05:00
|
|
|
# List mixins
|
|
|
|
|
|
|
|
<% (1..4).each do |counter| %>
|
|
|
|
list_<%= counter %>:
|
2004-12-22 09:14:45 -05:00
|
|
|
id: <%= counter+1006 %>
|
2004-12-19 08:01:47 -05:00
|
|
|
pos: <%= counter %>
|
|
|
|
type: ListMixin
|
|
|
|
parent_id: 5
|
2004-12-22 09:14:45 -05:00
|
|
|
<% end %>
|
2005-04-17 05:52:12 -04:00
|
|
|
|
|
|
|
# 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 %>
|
2005-11-10 01:19:50 -05:00
|
|
|
|
|
|
|
# subclasses of list items
|
|
|
|
<% (1..4).each do |i| %>
|
|
|
|
list_sub_<%= i %>:
|
|
|
|
id: <%= i + 5000 %>
|
|
|
|
pos: <%= i %>
|
|
|
|
parent_id: 5000
|
|
|
|
type: <%= (i % 2 == 1) ? ListMixinSub1 : ListMixinSub2 %>
|
|
|
|
<% end %>
|