NoMethodError in Home::Projects#show

Showing /home/playplus/www/space_tour/app/views/home/projects/show.html.erb where line #3 raised:

undefined method `parent' for nil:NilClass
Did you mean?  present?
Extracted source (around line #3):
1
2
3
4
5
6
              
<section style="background-image:url('/img/bb1.png');" class="breadcrumbs">
<div class="container">
<div class="text-left breadcrumbs-item"><a href="/">首頁</a><i>/</i><a href="#" class="last"><%=@category.parent.name%></a>
<h2><%=@category.name%></h2>
</div>
</div>

Rails.root: /home/playplus/www/space_tour

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"id"=>"99"}

Response

Headers:

None