repo.or.cz
/
monkeycharger.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Upgraded Rails and RSpec
[monkeycharger.git]
/
vendor
/
rails
/
activerecord
/
test
/
fixtures
/
mixins.yml
blob
0f60e92c2ff724b131ee0c42b8a1102d96593f66
1
# Nested set mixins
2
3
<% (1..10).each do |counter| %>
4
set_<%= counter %>:
5
id: <%= counter+3000 %>
6
<% end %>
7
8
# Big old set
9
<%
10
[[4001, 0, 1, 20],
11
[4002, 4001, 2, 7],
12
[4003, 4002, 3, 4],
13
[4004, 4002, 5, 6],
14
[4005, 4001, 14, 13],
15
[4006, 4005, 9, 10],
16
[4007, 4005, 11, 12],
17
[4008, 4001, 8, 19],
18
[4009, 4008, 15, 16],
19
[4010, 4008, 17, 18]].each do |set| %>
20
tree_<%= set[0] %>:
21
id: <%= set[0]%>
22
parent_id: <%= set[1]%>
23
type: NestedSetWithStringScope
24
lft: <%= set[2]%>
25
rgt: <%= set[3]%>
26
root_id: 42
27
28
<% end %>
29