title: Foreign key (class_id) not populating in belongs_to association
body: <p>I'm new to rails and building a small test app on rails3 (beta4).</p>
  
  <p>I am using <strong>Authlogic</strong> to manage user sessions (setup in a standard fashion as <a href="http://github.com/binarylogic/authlogic_example" rel="nofollow noreferrer">per this tutorial</a>)</p>
  
  <p>I have scaffolded and setup a card model (a post basically), and set up the basic active record associations for a <code>belongs_to</code> and <code>has_many</code> relationship</p>
  
  <p><strong>user.rb</strong></p>
  
  <pre><code>has_many :cards
  </code></pre>
  
  <p><strong>card.rb</strong></p>
  
  <pre><code>belongs_to :user
  </code></pre>
  
  <p>I added my foreign key column to my cards table: <code>user_id</code> which defaults to <code>1</code></p>
  
  <p><em>Everything works fantastically</em>. I've done my views and I can see the associations, card can belong to various users and it's all great.</p>
  
  <p><strong>But</strong> I can not seem to grab the current active user when creating a new card</p>
  
  <p><strong>cards_controller.rb</strong></p>
  
  <pre><code>def new
    @card = Card.new
    @card.user = current_user
  
    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml =&gt; @card }
    end
  end
  </code></pre>
  
  <p><code>current_user</code> is defined in the application controller, <a href="http://github.com/binarylogic/authlogic_example/blob/5819a13477797d758cb6871f475ed1c54bf8a3a7/app/controllers/application_controller.rb" rel="nofollow noreferrer">available to view here</a></p>
  
  <p><code>user_id</code> is passing <code>NULL</code> and nothing gets written to the database <code>user_id</code> column, leaving it to default to <code>1</code> rather than the ID of actual signed in user.</p>
  
  <p>I tried the obvious things like <code>@user = current_user</code></p>
  
  <p>It's probably something super simple, but today is my first real day with rails - Thanks!</p>