diff --git a/db/migrate/20190729080935_modify_login_for_users.rb b/db/migrate/20190729080935_modify_login_for_users.rb index a4a7d3f51..274e163de 100644 --- a/db/migrate/20190729080935_modify_login_for_users.rb +++ b/db/migrate/20190729080935_modify_login_for_users.rb @@ -2,8 +2,8 @@ class ModifyLoginForUsers < ActiveRecord::Migration[5.2] def change users = User.where("created_on > '2019-07-26 19:00:00'") users.find_each do |use| - use.update_attributes(:login, use.login.strip, phone: user.phone.try(:strip)) - use.user_extension.update_column(:student_id,use.user_extension.student_id.try(:strip)) + use.update_attributes(login: use.login.strip, phone: use.phone.try(:strip)) + use.user_extension.update_column(:student_id, use.user_extension.student_id.try(:strip)) end end end