Skip to content

Commit 993dcc5

Browse files
committed
close #95, added some programs to seeds
1 parent e8acec3 commit 993dcc5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

db/seeds.rb

+20
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,23 @@
7373
question.save!
7474
questions[i] = question
7575
end
76+
77+
program_code = "
78+
Turtle.draw do
79+
background maroon
80+
pencolor honeydew
81+
450.times do
82+
forward 100
83+
turnright 70
84+
end
85+
end
86+
"
87+
88+
5.times do |i|
89+
program = Program.new(:author_username => users[i].username,
90+
:title => Faker::Lorem.sentence,
91+
:description => Faker::Lorem.sentences.join(" "),
92+
:source_code => program_code)
93+
program.save!
94+
end
95+

0 commit comments

Comments
 (0)