Re: Noob question .each problem

radu puspana
2010-01-04T17:54:44Z

Problem solved!

Hi again Fred,

I tried user.detect {|current_user| current_user.hashed_password
==User.encrypt(password,current_user.salt)}  and it worked like a
charm.

thx a million yet again for ALL your help,
radu

On Jan 4, 7:34 pm, Frederick Cheung
<frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> On Jan 4, 4:53 pm, radu puspana
<radupusp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > On Jan 4, 6:22 pm, Frederick Cheung
<frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > wrote:
>
> > Sry for bothering you agan but shouldn''t it be :
> >  user.detect {|current_user| current_user.hashed_password => >
User.encrypt(password,current_user.salt)} reather than user.detect {|
> > current_user| current_user== User.encrypt
> > (password,current_user.salt)} ??.
> > == means a condition if i recall correctly.
> > because the string that comes out of  User.encrypt
> > (password,current_user.salt)} should be compared with something in the
> > current_user, namely hashed_password,  not the object refered by the
> > variable current_user, right?
>
> correct.
>
> Fred