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

Ruby

Ruby on Rails > Adding Styles > No method error status#index

How do I delete all my testing data? Users and Statuses.

Basically the entire app is giving this message.

4 Answers

Where are you getting this error? When you try to access the statuses page?

All the pages actually. When I try to log in, log out, register, and view statuses.

Can you post your code for your application.html.erb and index.html.erb pages?

<div class="page-header"> <h1>All of the Statuses</h1> </div>

<%= link_to "Post a New Status", new_status_path, class: "btn btn-success" %>

<% @statuses.each do |status| %> <div class="status"> <strong><%= status.user.full_name %></strong> <p><%= status.content %></p> <div class="meta"> <%= link_to time_ago_in_words(status.created_at) + " ago", status %> <span class="admin"> | <%= link_to "Edit", edit_status_path(status) %> | <%= link_to "Delete", status, method: :delete, data: { confirm: "Are you sure your want to delete this status?"} %> </span> </div> </div> <% end %>

<!DOCTYPE html> <html> <head> <title>Treebook</title> <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> <%= csrf_meta_tags %> </head> <body> <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <a href="#" class="brand"> Treebook</a> <ul class="nav"> <li><%= link_to "All Statuses", statuses_path %></li> </ul> <ul class="nav pull-right"> <% if user_signed_in? %> <li><%= link_to current_user.full_name, edit_user_registration_path %></li> <li><%= link_to "Log Out", destroy_user_session_path, method: :delete %><li> <% else %> <li><%= link_to "Register", new_user_registration_path %></li> <li><%= link_to "Log in", new_user_session_path %></li> <% end %>

                </ul>
            </div>
        </div>
    </div>
    <div class="container">
    <p class="notice"><%= notice %></p>
    <p class="alert"><%= alert %></p>

        <%= yield %>
    </div>
</body>
</html>

I'm having trouble getting Markdown to recognize the code. Sorry!