Closed masato-bkn closed 1 year ago
I suggest to add description about Active Record redundant all.
all
I often come across all used as receiver of Active Record query methods.
# bad User.all.order(:created_at) User.all.find(id) User.all.where(id: ids) # good User.order(:created_at) User.find(id) User.where(id: ids)
In these cases, the output is same with or without all, so I think it's redundant and could be removed.
If there's a positive reaction to this issue, I plan to submit a PR.
@masato-bkn There is no issue if the redundant all method call will be removed. Can you open a PR?
I suggest to add description about Active Record redundant
all
.I often come across
all
used as receiver of Active Record query methods.In these cases, the output is same with or without
all
, so I think it's redundant and could be removed.If there's a positive reaction to this issue, I plan to submit a PR.