Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/09/2006, 12:30
elliotmoso
 
Fecha de Ingreso: septiembre-2006
Mensajes: 81
Antigüedad: 18 años, 2 meses
Puntos: 5
a ver si me pueden ayudar

toy haciendo un blog y me da este error a ver si alguien me puede ayudar
Código:
 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'
Esto es lo que me dice