title: Getting the model class from active record relation
body: <p>I have a Rails model:</p>
  
  <pre><code>class Foo &lt; ActiveRecord::Base
    ...
  end
  </code></pre>
  
  <p>Given an active record relation:</p>
  
  <pre><code>limited_foo = Foo.where(...)
  </code></pre>
  
  <p>how can I get the original model class?</p>
  
  <pre><code>limited_foo ... # =&gt; Foo
  </code></pre>