Sha256: 779772def75549ebd20f55efa4457da5995738619133e66925c6fc6f73b9e45e

Contents?: true

Size: 553 Bytes

Versions: 11

Compression:

Stored size: 553 Bytes

Contents

namespace :quadro do
  desc 'Create admin user for quadro'
  task :create_admin_user => :environment do |task|
    unless Quadro::User.any?
      Quadro::User.create(name: 'Quadro', email: 'quadro@example.com', password: 'quadro123', password_confirmation: 'quadro123')
    end
  end

  desc 'Create root page for quadro'
  task :create_root_page => :environment do |task|
    unless Quadro::Page.any?
      Quadro::Page.create(title: 'Home', summary: 'Welcome to Quadro CMS', template: 'demo', author_id: Quadro::User.first.try(:id))
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
quadro-0.6.1 lib/tasks/quadro_tasks.rake
quadro-0.6.0 lib/tasks/quadro_tasks.rake
quadro-0.5.8 lib/tasks/quadro_tasks.rake
quadro-0.5.7 lib/tasks/quadro_tasks.rake
quadro-0.5.6 lib/tasks/quadro_tasks.rake
quadro-0.5.5 lib/tasks/quadro_tasks.rake
quadro-0.5.4 lib/tasks/quadro_tasks.rake
quadro-0.5.3 lib/tasks/quadro_tasks.rake
quadro-0.5.2 lib/tasks/quadro_tasks.rake
quadro-0.5.1 lib/tasks/quadro_tasks.rake
quadro-0.5.0 lib/tasks/quadro_tasks.rake