title: rails belongs_to foreign key is null
body: <p>i have the following models</p>
  
  <pre><code>class User    
  has_many :projects, :through =&gt; :bids
  has_many :bids, :dependent =&gt; :destroy
  end
  
  class Project
  attr_accessible :name, :user_id
  
  has_many :users, :through =&gt; :bids
  has_many :bids, :dependent =&gt; :destroy
  
  belongs_to :projectmanager, :class_name =&gt; "User", :foreign_key =&gt; "user_id"
  
  end
  
  class Bid
  attr_accessible :project_id, user_id
  belongs_to :user
  belongs_to :project
  end
  </code></pre>
  
  <p>As you can see, my <strong>Project</strong> class has both *has_many* and *belongs_to* to the same model (<strong>User</strong>) </p>
  
  <p>In <strong>Project</strong> controller <strong>new</strong> I have</p>
  
  <pre><code>def new
  @project = Project.new
  @project.gencontr = current_user
  </code></pre>
  
  <p>where <strong>current_user</strong> is Devise current logged in user.</p>
  
  <p>When I save the project, the column <strong>user_id</strong> in the <strong>Projects</strong> table is always null. Can you show me where do I go wrong on this one...Thank you</p>