title: Getting a NameError with ActiveRecord and relationships
body: <p>I've run into a problem when using a one to many relationship. I want to have each Series have one Publisher and that one Publisher has many Series.</p>
  
  <p>This is my Publisher model:</p>
  
  <pre><code>class Publisher &lt; ActiveRecord::Base
    validates_presence_of :name
    has_many :series
  end
  </code></pre>
  
  <p>This is my Serie model:</p>
  
  <pre><code>class Serie &lt; ActiveRecord::Base
    belongs_to :publisher
  end
  </code></pre>
  
  <p>This is the failing test:</p>
  
  <pre><code>test "a publisher should have a list of series" do
    @publisher = Publisher.new :name =&gt; "Standaard Uitgeverij"
    @series = [ Serie.new(:name =&gt; "De avonturen van Urbanus", :publisher =&gt; @publisher),
                Serie.new(:name =&gt; "Suske en Wiske", :publisher =&gt; @publisher) ]
    assert_equal @series, @publisher.series
  end
  </code></pre>
  
  <p>The test fails on the last line with NameError: uninitialized constant Publisher::Series.</p>
  
  <p>I tried to save the publisher and the series, but this did not work. I tried it with only one serie, but this gives the same error.</p>
  
  <p>Since I'm just starting out with Rails and Ruby, I am at a loss here. What am I doing wrong?</p>