Skip to content

Commit

Permalink
rake db:sample_data should be idempotent.
Browse files Browse the repository at this point in the history
  • Loading branch information
christiannelson committed Dec 26, 2012
1 parent 575d983 commit 2e01e53
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app_prototype/db/sample_data.rb
Expand Up @@ -10,14 +10,14 @@
# Data that is required by the application across all environments (i.e. reference data) should _not_ be included here.
# That belongs in seeds.rb instead.

User.create! do |u|
u.email = 'user@example.com'
# TODO Disable sending emails, no need for seed data.

User.find_or_create_by_email('user@example.com') do |u|
u.name = 'Ustead User'
u.password = 'password'
end.activate!

User.create! do |u|
u.email = 'admin@example.com'
User.find_or_create_by_email('admin@example.com') do |u|
u.name = 'Adam Admin'
u.password = 'password'
u.admin = true
Expand Down

0 comments on commit 2e01e53

Please sign in to comment.