title: How to find polymorphic relation
body: <pre><code>class Item &lt; ActiveRecord::Base
  belongs_to :rulable, :polymorphic =&gt; true
  end
  class foo &lt; ActiveRecord::Base
  has_many :items, :as =&gt; rulable
  end
  class bar &lt; ActiveRecord::Base
  has_many :items, :as =&gt; rulable
  end
  </code></pre>
  
  <p>What is the best way to find items belonging to a foo? I'm currently using something like this:</p>
  
  <pre><code>f = Foo.find 1
  Item.find_by_rulable_id_and_rulable_type(f, 'Foo')
  </code></pre>