Código:
Esto es lo que me dice NoMethodError in Blog#index Showing app/views/blog/_article.rhtml where line #5 raised: You have a nil object when you didn't expect it! The error occured while evaluating nil.name Extracted source (around line #5): 2: <h1><%= link_to article.title, :action => 'showNew', :id => article %></h1> 3: <p class="auth">Posted by <%= h(article.author) %> <span class="date"><%= distance_of_time_in_words(Time.now,article.created_at) %></span> ago</p> 4: <div class="excerpt"><%= article.excerpt %></div> 5: <p class="meta">Posted in <%= article.category.name %> | <%= link_to "#{article.comments.count} comments", :action => 'showNew', :id => article %></p> 6: </div> Trace of template inclusion: /app/views/blog/articles.rhtml RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/views/blog/_article.rhtml:5:in `_run_rhtml_blog__article' #{RAILS_ROOT}/app/views/blog/articles.rhtml:3:in `_run_rhtml_blog_articles' #{RAILS_ROOT}/app/views/blog/articles.rhtml:1:in `each' #{RAILS_ROOT}/app/views/blog/articles.rhtml:1:in `_run_rhtml_blog_articles' #{RAILS_ROOT}/app/controllers/blog_controller.rb:5:in `index'