app/controllers/moments_controller.rb
Use find_each
instead of each
. Open
Open
Strategy.where(user: @viewers).each do |strategy|
- Read upRead up
- Exclude checks
This cop is used to identify usages of all.each
and
change them to use all.find_each
instead.
Example:
# bad
User.all.each
# good
User.all.find_each