Merge pull request #68 from abf/rosa-build:add-admin-into-seeds-rb

Add admin user into seed.rb
This commit is contained in:
warpc 2013-04-02 12:23:58 +04:00
commit 65b4a11cbe
1 changed files with 4 additions and 1 deletions

View File

@ -7,4 +7,7 @@ end
%w(rosa_system iso_worker_1 file_store).each do |uname| %w(rosa_system iso_worker_1 file_store).each do |uname|
user = User.new uname: uname, email: "#{uname}@rosalinux.ru", password: SecureRandom.base64 user = User.new uname: uname, email: "#{uname}@rosalinux.ru", password: SecureRandom.base64
user.confirmed_at, user.role = Time.now.utc, 'system'; user.save user.confirmed_at, user.role = Time.now.utc, 'system'; user.save
end end
admin = User.new uname: 'admin_user', email: 'admin_user@rosalinux.ru', password: 'admin_user'
admin.confirmed_at, admin.role = Time.now.utc, 'admin'; admin.save