title: ActiveRecord .find() method fails
body: <p>I want to show each Category by name. I have a Post and Category model and each post only has one category.</p>
  
  <p>This works: <code>&lt;% @category = Category.find(3) %&gt;</code> </p>
  
  <p>This fails: <code>&lt;% @category = Category.find(post.cat_id) %&gt;</code> </p>
  
  <p>My error: <code>Couldn't find Category with id= ".</code></p>
  
  <p>My view block:</p>
  
  <pre><code>&lt;% @posts.each do |post| %&gt;
    &lt;%= post.title %&gt;
    &lt;% @category = Category.find(post.cat_id) %&gt;
    &lt;%= @category.category %&gt;&lt;/td&gt;
  &lt;% end %&gt;
  </code></pre>