1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# rake db:seed
puts "adding users..."
users = User.create([
{ :name => 'admin',
:email_address => 'admin@g.cn',
:role => 'admin',
:password => 'admin',
:password_confirmation => 'admin'},
{ :name => 'council member',
:email_address => 'council_member@g.cn',
:role => 'council_member',
:password => 'council_member',
:password_confirmation => 'council_member'},
{ :name => 'council member 2',
:email_address => 'council_member2@g.cn',
:role => 'council_member',
:password => 'council_member2',
:password_confirmation => 'council_member2'},
{ :name => 'guest',
:email_address => 'guest@g.cn',
:role => 'guest',
:password => 'guest',
:password_confirmation => 'guest'},
{ :name => 'developer',
:email_address => 'developer@g.cn',
:role => 'developer',
:password => 'developer',
:password_confirmation => 'developer'}
])
puts 'adding agendas...'
agendas = Agenda.create([
{ :name => 'Go to the Zoo',
:description => 'Disneyland',
:start_at => 15.days.from_now,
:end_at => 16.days.from_now,
:owner_id => users[1].id},
{ :name => 'hosting a party',
:description => 'HIT',
:start_at => 15.days.from_now,
:end_at => 16.days.from_now,
:owner_id => users[1].id},
{ :name => 'agenda_test_name',
:description => 'agenda_test_description',
:start_at => 15.days.from_now,
:end_at => 16.days.from_now,
:owner_id => users[1].id}
])
|