title: rails one base class, two models and two db tables
body: <p>I want to create two models with almost identical structures. But I want to keep the data sets in two different tables. Is this possible in active record?</p>
  
  <p>The reason for the different tables is because I want a query that returns no results to be meaningful such as "no active model exists with those properties...", or "no inactive model exists with those properties..."</p>
  
  <p>Also, the classes behave almost identically, so an abstract or base model is important to keep it dry. But I want to be working with clearly named models so that I know I am working with "active" or "inactive" data.</p>
  
  <p>I would imagine the model classes would look something like this, but I am not quite sure how to have models reference different tables. Is this possible?</p>
  
  <pre><code>class BaseModel &lt; ActiveRecord::Base
    attr_accessible :foo, :bar,
  
  end
  
  class ActiveModel &lt; BaseModel
    # This class gets its data from table :active_models
  
  end
  
  class InactiveModel &lt; BaseModel
    # This class gets its data from table :inactive_models
  
  end
  </code></pre>