We provide helper for storing encrypted password. See example below:
classUserincludeClear::Model primary_key :id, type: :uuid column encrypted_password :Crypto::Bcrypt::Passworddefpassword=(x) self.encrypted_password =Crypto::Bcrypt::Password.create(x)endend# Create a new user with the passwordUser.create!({password: "helloworld"})#...# Get the created useruser =User.query.firstif user.encrypted_password.verify("thisisfalse") # < false#...end