title: Rails 3 - Find by name instead of id
body: <p>I'm trying to learn RoR, building my first app, a basic inventory application. I've tried searching around but could not find the correct syntax, so I thought I would ask.</p>
  
  <p>Here's my set up:</p>
  
  <p>Model</p>
  
  <pre><code>class Item &lt; ActiveRecord::Base
  belongs_to :supplier
  
  class Supplier &lt; ActiveRecord::Base
  has_many :items
  </code></pre>
  
  <p>Items Controller</p>
  
  <pre><code>@items = Item.find_all_by_supplier_id '1'
  </code></pre>
  
  <p>This will return the data that I want, but I was hoping to input the supplier name into the controller so that if the ID does not match up it will still work properly.</p>
  
  <p>Hope that's enough info, thanks!</p>