diff options
Diffstat (limited to 'db/fixtures/development/001_admin.rb')
-rw-r--r-- | db/fixtures/development/001_admin.rb | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/db/fixtures/development/001_admin.rb b/db/fixtures/development/001_admin.rb index cfff6bf8bc2..c857f6bcb3f 100644 --- a/db/fixtures/development/001_admin.rb +++ b/db/fixtures/development/001_admin.rb @@ -1,19 +1,21 @@ -admin = User.create( - :email => "admin@local.host", - :name => "Administrator", - :password => "5iveL!fe", - :password_confirmation => "5iveL!fe" -) +unless User.count > 0 + admin = User.create( + :email => "admin@local.host", + :name => "Administrator", + :password => "5iveL!fe", + :password_confirmation => "5iveL!fe" + ) -admin.projects_limit = 10000 -admin.admin = true -admin.save! + admin.projects_limit = 10000 + admin.admin = true + admin.save! -if admin.valid? -puts %q[ -Administrator account created: + if admin.valid? + puts %q[ + Administrator account created: -login.........admin@local.host -password......5iveL!fe -] + login.........admin@local.host + password......5iveL!fe + ] + end end |