076_fix_users_empty_email.rb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:0k
- class FixUsersEmptyEmail < ActiveRecord::Migration
- def self.up
- users = User.find(:all)
- users.each do |user|
- if user.email.empty?
- user.email = "typo@typo"
- user.save!
- end
- end
- end
- def self.down
- end
- end