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

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.