title: Rails seed file not creating record
body: <p>I am seeding a database for a rails project and one of my records is not being created. I can create it using the same exact syntax in rails console, but it just doesn't work in the seed file. Here is the code from the seed file:</p>
  
  <pre><code>admin = Admin.find_by_email('example@example.com')
  if !admin
  admin = Admin.create(:email =&gt; 'example@example.com', :password =&gt; 'password',              :password_confirmation =&gt; 'password', :first_name =&gt;
   'example', :last_name =&gt; 'admin')
  end
  
  if !Project.find_by_name('Templates')
    Project.create(:name =&gt; 'Templates', :admin =&gt; admin)
    if Project.find_by_name("Templates")
       puts "Project Found"
    else
      puts "Project not Found"
    end  
  end
  </code></pre>
  
  <p>When I run 'rake db:seed' it always says "Project not Found". If I run the same create statement in the rails console, it gives me back the created Project object.</p>