Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby User Authentication with Rails Password Hashing and Sign In Creating the Sessions Controller

William Romero
William Romero
4,807 Points

What is the method that we would call on the user object to check the submitted password?

i cant get this right sorry

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

The answer you're looking for is "authenticate". That's the method used to check the user's password. I have the sneaking suspicion that you tried to type the whole code in there instead of just the name of the method. There's an example of this method being used at around 49 seconds into this video https://teamtreehouse.com/library/user-authentication-with-rails/password-hashing-and-sign-in/testing-session-creation. Hope this helps!

William Romero
William Romero
4,807 Points

Thank alot this realy help, i was writing the method with the parameters.

Damian Kosowski
Damian Kosowski
19,746 Points

It's "authenticate". It is probably best to revisit the video because it is quite a important issue. You can read also a little bit about it here: http://api.rubyonrails.org/classes/ActiveModel/SecurePassword/ClassMethods.html#method-i-has_secure_password