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 trialAustin Gates
15,391 Pointsundefined method `user' for #<Status:0x007fddb6f656a8>
This is the error I'm getting when I post a status. The status actually goes through, but the /statuses/(status id) page gives me an error
1 Answer
Maciej Czuchnowski
36,441 PointsI downloaded your code and deployed it locally and everything works fine. It only shows errors when you don't apply any user to the status. Maybe you should reset your database just in case (rake db:reset).
Austin Gates
15,391 PointsShortly after posting this I again went into console, deleted all of the statuses and reset the DB and everything worked. I had tried this before but maybe missed a step. Thanks for your answer anyways! :)
Austin Gates
15,391 PointsAustin Gates
15,391 PointsThe video and everything I read said to do this:
Which returned an error.
I changed it to this:
And it worked, so what's the deal here. Does this mean that any user that's logged in, it will only display their name?
Here is the GitHub link https://github.com/ausgates/treebook