Hello!

I'm trying to render a template this way (below), but the object is nil at 
_category.html.erb file.

index.html.erb
 <%= render @categories %>

_category.html.erb

 <%=category.name %>

error:

undefined method `name' for nil:NilClass


With show.html.erb file it's render.

Thanks



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/OH33jczSjfQJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to