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

NoMethodError in Statuses#index

Help me to figure out this error, let me know how to fix this . I need some explanation regarding this error.

Showing D:/projects_Ruby/pingme/app/views/statuses/index.html.erb where line #9 raised:

undefined method `name' for #<Status:0x2dde750> Extracted source (around line #9):

6: 7: <% @statuses.each do |status| %> 8: <div class="status"> 9: <strong><%= status.name %></strong> 10: <p><%= status.content %></p> 11: <div class="meta"> 12: <%= link_to time_ago_in_words(status.created_at) + " ago", status %>

1 Answer

Hi Prabhakar,

Does your object status have a name property? And if it does, did you set the name property to the attr_reader or attr_accessor keys?