title: Rails 3 NoMethodError: undefined method `name' for nil:NilClass
body: <p>Whenever i tried to use</p>
  
  <pre><code>Table.create :a=&gt;"a", :b=&gt;"b"
  </code></pre>
  
  <p>or</p>
  
  <pre><code>tab=Table.new
  tab.a="a"
  tab.b="b"
  tab.save!
  </code></pre>
  
  <p>produces </p>
  
  <blockquote>
    <p>NoMethodError: undefined method `name' for nil:NilClass </p>
  </blockquote>
  
  <p>my table model is </p>
  
  <pre><code>class Table &lt; ActiveRecord::Base  
   set_table_name "table"
   set_primary_key "id"
  end
  </code></pre>