Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

I can't seem to pass the code challege for parameter modification please help

At the code challenge where you have to delete the params[:status] if it exists in the params hash, nothing I do will pass this challenge. i tried this: '''Ruby if params[:status] && params[:status].has_key?(:user_id) params[:status].delete(:user_id) end '''

And it still wouldn't pass, I even checked the output and sometimes it still showed it existed, but even when it showed nil it still wouldn't pass.

What am I doing wrong? I've been stuck on this for weeks.

3 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Osgaldor Storm is that all on one line? That may be the problem. Your code is correct:

if params[:status] && params[:status].has_key?(:user_id)
  params[:status].delete(:user_id)
end
Rodrigo Soares
Rodrigo Soares
2,460 Points

Jason I'm having the same problem as Osgaldor...

My code is exactly the same as you and him wrote and is still not working...

I can't seem to get the markdown to work in this post either. i put the 3 backticks before the language and after the code, but it still looks crappy.

I think there is a problem in the quiz.