title: How to create ActiveRecord tableless Model in Rails 3
body: <p>I am trying to create a Active Record tableless Model. My user.rb looks like this</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
  
    class_inheritable_accessor :columns
  
    def self.columns
      @columns ||= [];
    end
  
    def self.column(name, sql_type = nil, default = nil, null = true)
      columns &lt;&lt; ActiveRecord::ConnectionAdapters::Column.new(
        name.to_s,
        default,
        sql_type.to_s,
        null
      )
    end
  
  
    column :name, :text
    column :exception, :text
    serialize :exception      
  end
  </code></pre>
  
  <p>When creating the new object in controller </p>
  
  <p>@user = User.new</p>
  
  <p>I am getting the error</p>
  
  <p>Mysql2::Error: Table 'Sampledb.users' doesn't exist: SHOW FIELDS FROM <code>users</code></p>