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
Daniel Terreros
Courses Plus Student 6,178 PointsActionController::ParameterMissing: param not found: status
If you're building treebook in the currently unsupported (to this tutorial), rails 4. You may come across this error at the end of the in the Join Table video. Specifically the "should not update the status if nothing has changed" test in statuses_controller_test.rb.
1) Error:
StatusesControllerTest#test_should_not_update_the_status_if_nothing_has_changed:
ActionController::ParameterMissing: param not found: status
app/controllers/statuses_controller.rb:82:in `status_params'
app/controllers/statuses_controller.rb:54:in `block in update'
app/controllers/statuses_controller.rb:53:in `update'
test/controllers/statuses_controller_test.rb:94:in `block in <class:StatusesControllerTest>'
I believe this has to do with a change to the rails require behavior mentioned here, that returns a 400 error when the value for the required key is empty.
Anyone else run into this?
3 Answers

Brijesh Bharadwaj
4,705 PointsMy workaround
def status_params
params.require(:status).permit(:name, :content, :user_id) if params[:status]
end

Jason Seifer
Treehouse Guest TeacherHey Daniel Terreros sorry for the trouble! We'll be coming out with Rails 4 videos as soon as we can. In the mean time, you can use Rails 3.2.13 to follow along with the videos.
Daniel Terreros
Courses Plus Student 6,178 PointsI'm having fun running into and trying to fix these errors, but thank you for responding!

Jason Seifer
Treehouse Guest TeacherCheers! Check out the documentation on strong parameters for tips :)

Mike Mayer
2,151 PointsJason Seifer it would be awesome if you guys could post a 'solved' version of Treebook using Rails 4 for us to tutor ourselves on how to work through these challenges.
Maybe take a completed Rails 3 version and refactor with notes?? That would be amazing!
Thank you
Jake Rorrer
17,788 PointsJake Rorrer
17,788 PointsThat did the trick... thanks Brijesh!
Natalie Arellano
3,362 PointsNatalie Arellano
3,362 PointsHmmm...but now when I do this I get:
1) Error: StatusesControllerTest#test_should_not_update_the_status_if_nothing_has_changed: ArgumentError: When assigning attributes, you must pass a hash as an argument. app/controllers/statuses_controller.rb:51:in `block in update' app/controllers/statuses_controller.rb:50:in `update' test/controllers/statuses_controller_test.rb:89:in `block in <class:StatusesControllerTest>'
Anyone else see this?
Seph Cordovano
17,400 PointsSeph Cordovano
17,400 PointsThanks! That helped!
Tanner Brandt
12,044 PointsTanner Brandt
12,044 PointsThank you, Brijesh!!