about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-19 08:15:22 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-19 08:15:22 -0500
commitcfd314432d14b95e79ea7367197fdc69de05c5b2 (patch)
tree6ea0ae3159cd3cd790024213d2882d290d4af580 /db/migrate
parent7c60955f06f604a994708b76a23b678a07833f17 (diff)
correct references in kobold migration
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20190719121326_migrate_user_kobolds_to_account.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/db/migrate/20190719121326_migrate_user_kobolds_to_account.rb b/db/migrate/20190719121326_migrate_user_kobolds_to_account.rb
index 5413aaaab..c89b6049f 100644
--- a/db/migrate/20190719121326_migrate_user_kobolds_to_account.rb
+++ b/db/migrate/20190719121326_migrate_user_kobolds_to_account.rb
@@ -2,8 +2,9 @@ class MigrateUserKoboldsToAccount < ActiveRecord::Migration[5.2]
   disable_ddl_transaction!
   def up
     Account.local.find_each do |account|
-      account.kobold = a.user_is_a_kobold? || false
-      account.gently = a.user_gentlies_kobolds? || false
+      next if account.user.nil?
+      account.kobold = account.user.settings.is_a_kobold? || false
+      account.gently = account.user.settings.gentlies_kobolds? || false
       account.save
     end
   end