rubocop: fix various style issues.

This commit is contained in:
evazion
2019-12-22 16:21:58 -06:00
parent 09f6a84660
commit 309821bf73
288 changed files with 912 additions and 962 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env ruby
require_relative "../../config/environment"
def fix_favorites
Favorite.without_timeout do
# delete favorites with a nonexistent post_id
Favorite.where("NOT EXISTS (SELECT 1 FROM posts WHERE posts.id = favorites.post_id)").delete_all
end
end
def fix_migrations
ApplicationRecord.connection.execute("DELETE FROM scheme_migrations WHERE version = '201704142336170'")
end