Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #put this in lib/tasks/import.rake
- namespace :db do
- desc "Prepares your database by loading default data"
- task :setup => :environment do
- # create the admin user
- admin_user = User.create(:login=>"admin", :password=>"admin", :password_confirmation=>"admin", :email =>"admin@yourdomain.com")
- # create the admin role and assign it to the user
- admin_role = Role.create(:name=>"admin")
- admin_user.roles << admin_role
- end
- end
Add Comment
Please, Sign In to add comment