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 trialNaomi Freeman
Treehouse Guest TeacherStatus id gets lost when I create the handlebar link/helper
It's telling me Couldn't find Status with id=Status
The whole app is working, including the dropdown for activities. Just when I click on the link in the dropdown for activities, suddenly it thinks my statuses don't have ids.
My app has been perfectly functional up until this moment. I've been working on it 8 months and never had it squawk about status id before. Ever.
Thoughts?
https://github.com/summerspirit/laughing-wookie
Error should be in app - controllers - statuses_controller
If I change show, then it tells me on my entire views - statuses - show page that users and gravatars and all kinds of things don't exist.
Please help. Thanks!
3 Answers
Jason Seifer
Treehouse Guest TeacherHey Naomi Freeman it looks like your issue is on line 74 of application.js.
Currently it says:
path = Routes.status_path(activity.targetable_type);
Which makes sense that it would send in the "Status" model name. Instead, it should be the id:
path = Routes.status_path(activity.targetable_id);
Hope that helps!
Naomi Freeman
Treehouse Guest TeacherThanks Jason! I will play with it tonight, see if I can make it go. Just elbow-deep in an open data project atm :) Appreciate you taking the time to come answer this.
Naomi Freeman
Treehouse Guest TeacherAwesome. Fixed! Thanks again.