title: has_many & belongs_to is not working in rails
body: <p>I have created two models 1) Contact 2) Customer in my Rails application, now I want to join the two tables of these models. Tables are contacts &amp; customers respectively. I am using following code:</p>
  
  <p>1) contact.rb:</p>
  
  <pre><code>class Contact &lt; ActiveRecord::Base
    unloadable
    has_many :customers
  end
  </code></pre>
  
  <p>2) customer.rb</p>
  
  <pre><code>class Customer &lt; ActiveRecord::Base
    belongs_to :contact, :foreign_key =&gt; :contact_id`
  end
  </code></pre>
  
  <p>3) customers_controller.rb</p>
  
  <pre><code>def new
    @customer = Customer.new
    @customer = Customer.find(:all,:include =&gt; :contact_id)
  end
  </code></pre>
  
  <p>Here I am trying to access the primary key of contact table into customer table but it repeatedly gives this error "Association named 'contact_id' was not found; perhaps you misspelled it?" Can any one help me on this?</p>