i think you should read this link for this problem :-
http://ruby.railstutorial.org/chapters/modeling-and-viewing-users-two#sec:secure_passwords
On Sat, Jan 28, 2012 at 2:21 PM, Colin Law wrote:
> On 28 January 2012 07:45, uma ya wrote:
> > I am using require 'digest/sha1' to encrypt my passwor
On 28 January 2012 07:45, uma ya wrote:
> I am using require 'digest/sha1' to encrypt my password and save into
> database. During login it is showing the following error-
>
> undefined local variable or method `encrypted_password' for
> #
> code:
>
> before_save :encrypt_password
>
> def has_pass
you are not declared 'encrypted_password'' variable. so first declared that
variable in model and use it.
On Sat, Jan 28, 2012 at 1:15 PM, uma ya wrote:
> I am using require 'digest/sha1' to encrypt my password and save into
> database. During login it is showing the following error-
>
> undefin
I am using require 'digest/sha1' to encrypt my password and save into
database. During login it is showing the following error-
undefined local variable or method `encrypted_password' for
#http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "R
4 matches
Mail list logo