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:
taitus
2023-11-08 14:07:17 +01:00
committed by Javi Martín
parent 0aee568977
commit 76837919b8
11 changed files with 49 additions and 49 deletions

View File

@@ -1,19 +1,19 @@
section "Flagging Debates & Comments" do
40.times do
debate = Debate.all.sample
flagger = User.where.not(id: debate.author_id).all.sample
debate = Debate.sample
flagger = User.where.not(id: debate.author_id).sample
Flag.flag(flagger, debate)
end
40.times do
comment = Comment.all.sample
flagger = User.where.not(id: comment.user_id).all.sample
comment = Comment.sample
flagger = User.where.not(id: comment.user_id).sample
Flag.flag(flagger, comment)
end
40.times do
proposal = Proposal.all.sample
flagger = User.where.not(id: proposal.author_id).all.sample
proposal = Proposal.sample
flagger = User.where.not(id: proposal.author_id).sample
Flag.flag(flagger, proposal)
end
end