2011-12-04 21:19:49 +01:00
|
|
|
unless User.count > 0
|
|
|
|
admin = User.create(
|
|
|
|
:email => "admin@local.host",
|
|
|
|
:name => "Administrator",
|
|
|
|
:password => "5iveL!fe",
|
|
|
|
:password_confirmation => "5iveL!fe"
|
|
|
|
)
|
2011-10-08 23:36:38 +02:00
|
|
|
|
2011-12-04 21:19:49 +01:00
|
|
|
admin.projects_limit = 10000
|
|
|
|
admin.admin = true
|
|
|
|
admin.save!
|
2011-10-21 19:58:04 +02:00
|
|
|
|
2011-12-04 21:19:49 +01:00
|
|
|
if admin.valid?
|
|
|
|
puts %q[
|
|
|
|
Administrator account created:
|
2011-10-21 19:58:04 +02:00
|
|
|
|
2011-12-04 21:19:49 +01:00
|
|
|
login.........admin@local.host
|
|
|
|
password......5iveL!fe
|
|
|
|
]
|
|
|
|
end
|
2011-10-21 19:58:04 +02:00
|
|
|
end
|