Remove redundant .all in .all.sample calls
Rubocop doesn't detect this method because we've added it in the ApplicationRecord class, but we're removing the `.all` calls for consistency.
This commit is contained in:
@@ -5,15 +5,15 @@ end
|
||||
|
||||
section "Creating Communities Topics" do
|
||||
Community.find_each do |community|
|
||||
Topic.create(community: community, author: User.all.sample,
|
||||
Topic.create(community: community, author: User.sample,
|
||||
title: Faker::Lorem.sentence(word_count: 3).truncate(60), description: Faker::Lorem.sentence)
|
||||
end
|
||||
end
|
||||
|
||||
section "Commenting Community Topics" do
|
||||
30.times do
|
||||
author = User.all.sample
|
||||
topic = Topic.all.sample
|
||||
author = User.sample
|
||||
topic = Topic.sample
|
||||
Comment.create!(user: author,
|
||||
created_at: rand(topic.created_at..Time.current),
|
||||
commentable: topic,
|
||||
|
||||
Reference in New Issue
Block a user