diff --git a/db/migrate/20190729122213_delete_myshixun_games_for_users.rb b/db/migrate/20190729122213_delete_myshixun_games_for_users.rb index 9c93372e9..d52369828 100644 --- a/db/migrate/20190729122213_delete_myshixun_games_for_users.rb +++ b/db/migrate/20190729122213_delete_myshixun_games_for_users.rb @@ -4,7 +4,7 @@ class DeleteMyshixunGamesForUsers < ActiveRecord::Migration[5.2] myshixuns.find_each do |m| if m.games.count == m.games.select{|g| g.status == 3}.count puts("#######login: #{User.find(m.user_id).login}") - myshixuns.destroy! + m.destroy! end end end