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 Building Social Features in Ruby on Rails Creating Friendships What is a Join Table?

Lisa Rossiter
Lisa Rossiter
3,630 Points

Still have errors need help

I have got past all my testing errors although I am still not sure its all correct as it was more blindly fix rather than understanding what went wrong. I also now cannot submit a status. I have zipped up my code and popped it on my server for someone to have a look, watch out however I have been customising it as I go along so looks a bit bad in places.

I am hoping someone can look over it for me as I am so lost and have spent 2 weeks trying to fix it myself.

http://samtoms.com/ujunto.zip

2 Answers

Alright I fixed it :)

Go to your statuses_controller file and check your status_params under private. This is the correct params

def status_params
  params.require(:status).permit(:content, :user_id)
end

you just had a little syntax issue where you had params.permit instead of params.require

Lisa Rossiter
Lisa Rossiter
3,630 Points

Just tried it and it is all working, I had to modify a few things for it to work but got there and understand why it was wrong.

Lisa Rossiter
Lisa Rossiter
3,630 Points

Epic, thanks justin I was actually told to put that in but I understand the need for it. I will try your fix later thank you.