title: FactoryGirl association Parent can't be blank
body: <p>I am trying to use FactoryGirl to create a test database with an association that is Parent has_many Entries.  At this point, it is throwing the ActiveRecord validation error that Parent can't be blank.  I'm having a tough time with this one and have tried many, many methods of creating this test database with this association.  I think I am close, but I may not be even close and may have basic errors, so any and all advice is much appreciated.</p>
  
  <p>My guess is that the hash { parent_id: :id } is not being passed to the Entry factory.  That would fail the validation.  But, I don't know that that is actually the case and, even if it is, I don't know how to fix it.  Thanks in advance for your help... </p>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>ActiveRecord::RecordInvalid: Validation failed: Parent can't be blank</p>
  </blockquote>
  
  <p>The RSpec call is:</p>
  
  <pre><code>before(:all) do
    rand(11..25).times { FactoryGirl.create(:parent) }
    visit "/parents?direction=asc&amp;sort=parent_blog"  
  end
  after(:all)  do
    Parent.delete_all
  end
  </code></pre>
  
  <p>The Parent model is:</p>
  
  <pre><code>class Parent &lt; ActiveRecord::Base
    has_many :entries, dependent: :destroy
    accepts_nested_attributes_for :entries, :allow_destroy =&gt; :true
    validates :parent_blog, presence: true,
                uniqueness: true
  end
  </code></pre>
  
  <p>The Entry model is:</p>
  
  <pre><code>class Entry &lt; ActiveRecord::Base
    belongs_to :parent
    validates :entry_blog,     presence:true,
              uniqueness: true
    validates :parent_id,       presence: true
  end
  </code></pre>
  
  <p>The Parent factory is:</p>
  
  <pre><code>FactoryGirl.define do
    factory :parent do
      sequence(:parent_blog) { |n| "http://www.parent%.3d.com/ss" % n }
      entries { rand(5..15).times { FactoryGirl.create(:entry,  parent_id: :id) } }
    end
  end
  </code></pre>
  
  <p>The Entry factory is:</p>
  
  <pre><code>FactoryGirl.define do
    factory :entry do
      sequence(:entry_blog)      { |n| "http://www.parent%.3d.com/ss/entry%.3d" % [n, n] }
      parent_id                   { :parent_id }
    end
  end
  </code></pre>