When developing with rails, use the
create! function rather than the
create function in your
seeds.rb file. Since model creation should never fail when you're seeding the database, using
create! will throw an error when the model cannot be saved to the database, whereas
create will fail silently and maybe produce mind bending bugs.
User.create!(:username => 'user1', :password => 'password')
User.create(:username => 'user1', :password => 'password')