[Rails] Re: Noob question .each problem
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...@gmail.com>
wrote:
> On Jan 4, 4:53 pm, radu puspana <radupusp...@gmail.com> wrote:
>
> > On Jan 4, 6:22 pm, Frederick Cheung <frederick.che...@gmail.com>
> > 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
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home