Skip to content

Commit

Permalink
Fix Rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gclssvglx committed Jan 15, 2024
1 parent c205ac2 commit 7f1fb84
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion db/migrate/20200225114743_add_created_at_to_bet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class AddCreatedAtToBet < ActiveRecord::Migration[6.0]
def change
add_column :bets, :created_at, :datetime
Bet.reset_column_information
Bet.all.each do |b|
Bet.all.find_each do |b|
b.update!(created_at: b.set_created_at)
end
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20200228171904_add_permanent_to_bet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class AddPermanentToBet < ActiveRecord::Migration[6.0]
def change
add_column :bets, :permanent, :bool, default: false
Bet.reset_column_information
Bet.all.each do |b|
Bet.all.find_each do |b|
b.update!(permanent: true)
end
end
Expand Down
2 changes: 1 addition & 1 deletion features/step_definitions/best_bet_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
When(/^I delete all the best bets$/) do
@query_es_ids = []

Query.all.each do |query|
Query.all.find_each do |query|
@query_es_ids << "#{query.query}-#{query.match_type}"

query.bets.each do |bet|
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/publish_external_links.rake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ desc "Ensure all external links in the database are present in the publishing pl
namespace :publish_external_links do
desc "Send external links to the Publishing API"
task publishing_api: :environment do
RecommendedLink.all.each do |link|
RecommendedLink.all.find_each do |link|
puts link.link
ExternalContentPublisher.publish(link)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/reindex_best_bets.rake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ task reindex_best_bets: :environment do
puts "Starting to reindex #{Query.count} best bets in search_api"
start = Time.zone.now.to_f

Query.all.each do |query|
Query.all.find_each do |query|
puts "Processing: #{query.query} (#{query.match_type})"
SearchApiSaver.new(query).save # rubocop:disable Rails/SaveBang
end
Expand Down

0 comments on commit 7f1fb84

Please sign in to comment.