Skip to content

Commit

Permalink
don't chain encrypt method as it returns nil. closes #158
Browse files Browse the repository at this point in the history
madhums committed Mar 16, 2024
1 parent 04af37f commit b7d11f9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions db/migrate/20240316113449_encrypt_email_user_attribute.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
class EncryptEmailUserAttribute < ActiveRecord::Migration[7.1]
def up
User.all.find_each { |u| u.encrypt.save }
User.all.find_each do |u|
u.encrypt
u.save
end
end

def down
User.all.find_each { |u| u.decrypt.save }
User.all.find_each do |u|
u.decrypt
u.save
end
end
end

0 comments on commit b7d11f9

Please sign in to comment.