Sha256: d78723f238e8517cc03f64940f5fc75bd5a76ca45e79386252ff45a91fd339cc

Contents?: true

Size: 567 Bytes

Versions: 25

Compression:

Stored size: 567 Bytes

Contents

namespace :app do
  desc 'Bootstrap the application -- create admin/admin user, migrate database, etc'
  task :bootstrap => :environment do

    `rake db:migrate`
    puts '* Migrated database'

    u = User.new :login     => "ADMIN_LOGIN",
                 :password  => "ADMIN_PASSWORD",
                 :password_confirmation => "ADMIN_PASSWORD",
                 :email     => "ADMIN_EMAIL",
                 :lastname => "ADMIN_LASTNAME"
    u.admin = true
    u.save
    puts '* Created default  *** INSECURE *** account.'
  end

    task :seed do
    end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
r4-0.1.5 lib/r4/template/lib/tasks/bootstrap.rake
r4-0.1.4 lib/r4/template/lib/tasks/bootstrap.rake
r4-0.1.3 lib/r4/template/lib/tasks/bootstrap.rake
r4-0.1.2 lib/r4/template/lib/tasks/bootstrap.rake
r4-0.1.1 lib/r4/template/lib/tasks/bootstrap.rake