title: You cannot call create unless the parent is saved error when seeding in rails
body: <p>I'm trying to populate my SQLite3 database with a simple seed file that is supposed to create a bunch o movies entries in the Film table and then create some comments to this movies that are stored in Comments table.</p>
  
  <pre><code>formats = %w(Beta VHS IMAX HD SuperHD 4K DVD BlueRay)
  30.times do
    film = Film.create(title: "#{Company.bs}",
                   director: "#{Name.name}",
                   description: Lorem.paragraphs.join("&lt;br/&gt;").html_safe,
                   year: rand(1940..2015),
                   length: rand(20..240),
                   format: formats[rand(formats.length)]
    )
    film.save
    (rand(0..10)).times do
      film.comments.create( author: "#{Name.name}",
                            title: "#{Company.bs}",
                            content: Lorem.sentences(3).join("&lt;br/&gt;").html_safe,
                            rating: rand(1..5)
        )
    end
  end
  </code></pre>
  
  <p>Once i execute rake db:seed I inevitably get the error </p>
  
  <blockquote>
    <p>ActiveRecord::RecordNotSaved: You cannot call create unless the parent is saved</p>
  </blockquote>
  
  <p>and no records are added to either Films or Comments</p>
  
  <p>My film.rb file is</p>
  
  <pre><code>class Film &lt; ActiveRecord::Base
    has_many :comments
  
    validates_presence_of :title, :director
    validates_length_of :format, maximum: 5, minimum:3
    validates_numericality_of :year, :length, greater_than:  0
    validates_uniqueness_of :title
    paginates_per 4
  end
  </code></pre>
  
  <p>The length limit on 'format' raises the error when creating a Film with formats selected from the 'format' list</p>