class MinimalistAuthentication::Conversions::MergePasswordHash
Attributes
user[RW]
Public Class Methods
new(user)
click to toggle source
# File lib/minimalist_authentication/conversions/merge_password_hash.rb, line 24 def initialize(user) self.user = user end
run!()
click to toggle source
# File lib/minimalist_authentication/conversions/merge_password_hash.rb, line 7 def run! user_model.where(using_digest_version: 3, password_hash: nil).find_each do |user| new(user).update! end end
Private Class Methods
user_model()
click to toggle source
# File lib/minimalist_authentication/conversions/merge_password_hash.rb, line 15 def user_model MinimalistAuthentication.configuration.user_model end
Public Instance Methods
update!()
click to toggle source
# File lib/minimalist_authentication/conversions/merge_password_hash.rb, line 28 def update! user.update_column(:password_hash, merged_password_hash) end
Private Instance Methods
merged_password_hash()
click to toggle source
# File lib/minimalist_authentication/conversions/merge_password_hash.rb, line 34 def merged_password_hash "#{salt}#{crypted_password}" end