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


Updating Index Page Issue

Im trying to add the "Edit" and "Delete" buttons to my page however they dont seem to show up. Below is my code.

<% @statuses.each do |status| %> <%= status.name%> <%= status.content %>

<%= link_to "Show", status %> <%link_to "Edit", edit_status_path(status) %> | <%link_to "Delete", status, method: :delete, data: { confirm: "Are you sure you want to delete this?"} %>

4 Answers

did you close your <code><% @statuses.each do |status| %></code> with a <code><% end %></code> ?

Try running "rake routes" to ensure your routes are correct.

Also I assume you have an <% end %> at the bottom of this?

I forgot to add the <%end%> , also there was an error in one of my lines:

<%link_to "Edit"..etc

it should be

<%=link_to "Edit"...etc


Yay teamwork! :D