We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bca1173 commit c9ea3f3Copy full SHA for c9ea3f3
db/seeds.rb
@@ -10,6 +10,7 @@
10
# Clear existing records
11
User.destroy_all
12
Article.destroy_all
13
+Comment.destroy_all
14
15
# Create users
16
users = [
@@ -37,3 +38,14 @@
37
38
user: users.sample
39
)
40
end
41
+
42
+articles = Article.all
43
44
+# Create comments
45
+90.times do |i|
46
+ Comment.create!(
47
+ text: "Sample Comment #{i + 1}",
48
+ article: articles.sample,
49
+ user: users.sample
50
+ )
51
+end
0 commit comments