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 Resets and Testing Password Resets

Nick Stoneman
Nick Stoneman
10,093 Points

Code Challenge Help. "Adding the Password Reset Controller"

I'm stuck and can't figure this out. Any help is appreciated.

Fill in the blank to complete the following code that would find a user by the email attribute. Assume that the email was submitted as a key in the request parameters:

Why won't this pass?

user = User.find_by(email: params[:email])

2 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

I entered email in the first one and params in the second one and it passed.

Nick Stoneman
Nick Stoneman
10,093 Points

Thanks. Coming back a day later it does pass.

Maybe check if there is a bug here? I was really banging my head on my desk and reworking through the lesson thinking I missed something. I just would not accept this answer yesterday.