convert all emails to lowercase

This commit is contained in:
robcolbert 2019-07-04 02:21:52 -04:00
parent 0f62506a3c
commit b8a2baf9ac
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
task fix_email_case: 'gabsocial:fix_email_case'
namespace :gabsocial do
desc 'Convert emails to lowercase'
task :fix_email_case => :environment do
User.select(:id, :email).all.each do |user|
user.update_column :email, user.email.downcase
puts(user.id)
end
end
end