title: Rails model can't access belongs_to model even though foreign key exists
body: <p>I have a Model called Challenge that is created by a User. It has a Difficulty associated with it as well. When I create the Challenge and hand it the Author (User) and Difficulty, the Difficulty associate works, but the Author (User) one doesn't. The weirdest part is, when you look at the Challenge object, it shows the Author key its associated with.</p>
  
  <pre><code>challenge = Challenge.first
  challenge.author (prints Nil) #Doesn't even run a Query
  </code></pre>
  
  <p>When I create a Challenge using the following code, the user_id is Nil.</p>
  
  <pre><code>user = User.find(1)
  diff = Difficulty.find(1)
  Challenge.create(:author =&gt; user, :difficulty =&gt; diff, :title =&gt; "My Challenge")
  </code></pre>
  
  <p>When I create a Challenge using this code, the User gets the relation to the Challenge and the Challenge gets the user_id of the User. But you can only go from User to Challenge. Challenge to User returns Nil.</p>
  
  <pre><code>user = User.find(1)
  diff = Difficulty.find(1)
  chall = Challenge.create(:difficulty =&gt; diff, :title =&gt; "My Challenge")
  user.authored_challenges &lt;&lt; chall
  </code></pre>
  
  <p>Here are my Models and Tables</p>
  
  <pre><code># Models
  class User &lt; ActiveRecord::Base
    has_many :authored_challenges, :class_name =&gt; "Challenge"
    attr_accessible :display_name, :authored_challenges   
  end
  
  class Reward &lt; ActiveRecord::Base
    has_many :challenges
    attr_accessible :name, :value, :challenges
  end
  
  class Challenge &lt; ActiveRecord::Base
    belongs_to :reward
    belongs_to :author, :class_name =&gt; "User"
    attr_accessible :title, :description, :reward, :author
  end
  
  # Tables
  create_table :users do |t|
    t.string :display_name
    t.timestamps
  end
  
  create_table :rewards do |t|
    t.string :name
    t.float :value
    t.timestamps
  end
  
  create_table :challenges do |t|
    t.integer :user_id
    t.integer :reward_id
    t.string :title
    t.string :description
    t.timestamps
  end
  </code></pre>