title: Rails undefined method `category' for nil:NilClass
body: <p>I am having a very strange problem, I have this file for User#show view:</p>
  
  <pre><code>%h1 My Appliances
  .floatright= link_to "Add appliance", new_appliance_profile_path
  %table
    %tr
      %th Category
      %th Manufacturer
      %th Model
      %th Room
      %th Hours On
      %th Hours Sleeping
      %th
    - @user.appliance_profiles.each do |ap|
      %tr{:class =&gt; cycle('list_line_odd', 'list_line_even')}
        %td= ap.appliance.category
        %td= ap.appliance.manufacturer
        %td= ap.appliance.model
        %td= ap.room.name
        %td= ap.hours_on
        %td= ap.hours_sleep
        %td= link_to "edit", edit_appliance_profile_path(ap)
  </code></pre>
  
  <p>and receive the error: <code>undefined method 'category' for nil:NilClass</code></p>
  
  <p>My model does have a category string attribute. What does this mean and how do I fix it?</p>