Sha256: edcad14cdac1fe89d9c86c70378d989d16a0c0a0763b3f16ac65ce144e57b303

Contents?: true

Size: 963 Bytes

Versions: 41

Compression:

Stored size: 963 Bytes

Contents

Bundler.require(:default, Rails.env)

namespace :cortex do
  namespace :core do
    namespace :db do
      desc 'Re-Seeds (will wipe existing ContentTypes!) Cortex with Core Custom Content Seed Data'
      task reseed: :environment do
        Rake::Task['cortex:core:db:clear'].execute
        Rake::Task['cortex:core:media:seed'].execute
        Rake::Task['employer:blog:seed'].execute # TODO: Extract
      end

      desc 'Clear Existing Custom Content Data From DB'
      task clear: :environment do
        puts "Clearing ContentTypes..."
        ContentType.destroy_all
        puts "Clearing Fields..."
        Field.destroy_all
        puts "Clearing ContentItems..."
        ContentItem.destroy_all
        puts "Clearing FieldItems..."
        FieldItem.destroy_all
        puts "Clearing ContentableDecorators..."
        ContentableDecorator.destroy_all
        puts "Clearing Decorators..."
        Decorator.destroy_all
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
cortex-plugins-core-2.1.1 lib/tasks/cortex/core/db.rake
cortex-plugins-core-2.1.0 lib/tasks/cortex/core/db.rake
cortex-plugins-core-2.0.1 lib/tasks/cortex/core/db.rake
cortex-plugins-core-1.1.1 lib/tasks/cortex/core/db.rake
cortex-plugins-core-1.1.0 lib/tasks/cortex/core/db.rake
cortex-plugins-core-1.0.0 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.12.4 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.12.3 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.12.2 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.12.1 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.12.0 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.11.3 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.11.2 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.11.1 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.11.0 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.10.4 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.10.2 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.10.1 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.10.0 lib/tasks/cortex/core/db.rake
cortex-plugins-core-0.9.1 lib/tasks/cortex/core/db.rake