I have been following following tutorial to make a user login session.
I used the following action to encrypt the password.
self.salt = SecureRandom.hex(10) if !self.salt?
self.password = User.encrypt(@password1, self.salt)
but when it is called following error is generated.
SystemStackError (stack level too deep):
I am not sure if this way of calling an action is correct or not. I need help with this one asap.