title: ActiveRecord BelongsToAssociation sometimes not resolving to object
body: <p>So, I've got a couple of models in Rails 2.3.11:</p>
  
  <pre><code>class RememberToken &lt; ActiveRecord::Base
      belongs_to :user
      ...
  end
  
  class User &lt; ActiveRecord::Base
      has_many :remember_tokens
      ...
  end
  </code></pre>
  
  <p>And in a controller, I do:</p>
  
  <pre><code>tok = RememberToken.find_by_token(token_str)
  if tok
      u = tok.user
      ...
  end
  </code></pre>
  
  <p>When I go to do something with u, it turns out it's an instance of <code>ActiveRecord::Associations::BelongsToAssociation</code>, not <code>ActiveRecord::Base</code>.</p>
  
  <p>When I change the code to:</p>
  
  <pre><code>u = User.find(tok.user_id)
  </code></pre>
  
  <p>all works well. But this is not Best Practices in Rails-land.</p>
  
  <p>Even more frustratingly, the first example only fails in my controller -- doing the same in script/console works fine.</p>
  
  <p>I suspect that this behavior started when we upgraded Rails from 2.3.8 to 2.3.11, but it's hard to know for certain.</p>
  
  <p>I'm completely baffled by this behavior -- any suggestions?</p>