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


2,949 Points

Trying to display attachments in all statuses view

So I follow the example in the lesson with displaying the files in Rails (https://teamtreehouse.com/library/programming/advanced-social-features-in-ruby-on-rails/uploading-files/displaying-files)

But it doesn't seem to work when I try to see it in all statuses. I am getting this error:


It seems like he cannot recognize "document" method which is called when he go to look for helper in my application helpers.

Why this is happening??


I am adding the code:

1 Answer

Should those statuses be @status? I'm not sure what you are defining in your controllers without seeing your code.

2,949 Points

Thanks for answer @Andy Brown! Here is the code:

What I am doing wrong here?

Try to remove the @ from the status variable in your application_helper. That could be the problem.

2,949 Points

IT WORKS! Thanks @Andy!

Now my question to understand what happened behind the curtain: This status_document_link variable was working fine for creating new status on separate page, why it didn't work for displaying all statuses? :)