diff --git a/db/migrate/20240923131205_add_child_birthday_to_usr.rb b/db/migrate/20240923131205_add_child_birthday_to_usr.rb index e97bf92..a020225 100644 --- a/db/migrate/20240923131205_add_child_birthday_to_usr.rb +++ b/db/migrate/20240923131205_add_child_birthday_to_usr.rb @@ -3,7 +3,7 @@ def change add_column :users, :child_birthday, :date User.find_each do |user| - user.update(child_birthday: user.created_at - 18.months) + user.update(child_birthday: Time.now - user.child_age.months) end remove_column :users, :child_age, :date