mardi 13 mars 2018

How to print the user password in rails view

In my controller

@user = User.last

In my view

<%= @user.password.inspect %> it returns nil value. but if i am using <%= @user.encrypted_password.inspect %> it shows "$2a$11$LXD0UDB3kvwxqG/w/0icGuy6iXEOFZ264ushzSi6LfXSdAitwPmNO" but i need to print the password not the encrypted password. so help me guys.

Aucun commentaire:

Enregistrer un commentaire