title: ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass
body: <p>I'm newbie to Rails.<br>
  I have two models <strong>Category</strong> and <strong>Product</strong> as follows:-  </p>
  
  <pre><code>class Category &lt; ActiveRecord::Base
   attr_accessible :type
  
   has_many :products
  end
  
  class Product &lt; ActiveRecord::Base
   attr_accessible :category_id, :color, :price, :title
  
   belongs_to :category
  end
  </code></pre>
  
  <p>And my <strong>schema.rb</strong> is as follows:-  </p>
  
  <pre><code>ActiveRecord::Schema.define(:version =&gt; 20130725220046) do
  
  create_table "categories", :force =&gt; true do |t|
      t.string   "type"
      t.datetime "created_at", :null =&gt; false
      t.datetime "updated_at", :null =&gt; false
    end
  
    create_table "products", :force =&gt; true do |t|
      t.integer  "category_id"
      t.decimal  "price",       :precision =&gt; 10, :scale =&gt; 0
      t.string   "title"
      t.string   "color"
      t.datetime "created_at",                                 :null =&gt; false
      t.datetime "updated_at",                                 :null =&gt; false
    end
  
  end
  </code></pre>
  
  <p>In Rails console I created two products with two products with the <strong>Product.create</strong> command  </p>
  
  <pre><code>[#&lt;Product id: 1, category_id: 1, price: 500, title: "shirt", color: "blue", `created_at: "2013-07-25 22:04:54", updated_at: "2013-07-25 22:04:54"&gt;, #&lt;Product id: 2, category_id: 1, price: 600, title: "tees", color: "black", created_at: "2013-07-25 22:05:17", updated_at: "2013-07-25 22:05:17"&gt;]`  
  </code></pre>
  
  <p>And created two Categories with the <strong>Category.create</strong> command in console  </p>
  
  <pre><code>&lt;Category id: 1, type: "clothing", created_at: "2013-07-25 22:03:54", updated_at: "2013-07-25 22:03:54"&gt;&lt;Category id: 2, type: "footwear", created_at: "2013-07-25 22:04:02", updated_at: "2013-07-25 22:04:02"&gt;  
  </code></pre>
  
  <p>Now, <strong>Product.all</strong> works fine but <strong>Category.all</strong> gives  </p>
  
  <blockquote>
    <p>ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'clothing'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Category.inheritance_column to use another column for that information.  </p>
  </blockquote>
  
  <p>What's wrong in there? I want to make a relationship between Category and Product like<br>
  a category has_many products and products belongs_to a category.</p>