You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
782 B

12 years ago
admin = Admin.create(
email: 'admin@entrydns.net',
password: 'garlik1',
password_confirmation: 'garlik1'
13 years ago
)
12 years ago
admin.update_attribute(:active, true)
12 years ago
puts 'Admin created'
# an user for administrative purposes
admin = User.new(
full_name: 'admin admin',
12 years ago
email: 'admin@entrydns.net',
password: 'garlik1',
password_confirmation: 'garlik1'
)
admin.confirmed_at = Time.now
admin.save!
admin.confirm!
13 years ago
13 years ago
Settings.host_domains.each do |name|
12 years ago
host_domain = admin.domains.build(name: name)
12 years ago
host_domain.type = 'NATIVE'
host_domain.setup(admin.email)
host_domain.save!
13 years ago
end
# sample user
user = User.new(
full_name: 'user user',
12 years ago
email: 'user@entrydns.net',
password: 'useruser',
password_confirmation: 'useruser'
)
user.confirmed_at = Time.now
user.save!
user.confirm!