Commit df0526c4daa95132a9d4e1f36bb446ceb69d1ef1
1 parent
8f176d5f
Exists in
master
and in
22 other branches
Creating sample friendships The Right Way
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
script/sample-data
@@ -40,7 +40,7 @@ rand(people.size * 3).times do | @@ -40,7 +40,7 @@ rand(people.size * 3).times do | ||
40 | from = people.rand | 40 | from = people.rand |
41 | to = people.rand | 41 | to = people.rand |
42 | if from != to && !from.friends.include?(to) | 42 | if from != to && !from.friends.include?(to) |
43 | - from.add_friend(to) | 43 | + AddFriend.create!(:requestor => to, :target => from).finish |
44 | end | 44 | end |
45 | print '.'; $stdout.flush | 45 | print '.'; $stdout.flush |
46 | end | 46 | end |