Enable rails/findEach Rubocop cop
This cop enforce the use of `find_each` instead of `each`. Closes #1535
This commit is contained in:
parent
4d895ae3bc
commit
d160c22a0b
3 changed files with 5 additions and 9 deletions
|
|
@ -643,7 +643,7 @@ class Conference < ActiveRecord::Base
|
|||
def self.write_event_distribution_to_db
|
||||
week = DateTime.now.end_of_week
|
||||
|
||||
Conference.where('end_date > ?', Date.today).each do |conference|
|
||||
Conference.where('end_date > ?', Date.today).find_each do |conference|
|
||||
result = {}
|
||||
Event.state_machine.states.each do |state|
|
||||
count = conference.program.events.where('state = ?', state.name).count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue