Sha256: f5026431e4ff867517e842eb722abbc724f63f9060a6a64c49eaf354be253d01

Contents?: true

Size: 702 Bytes

Versions: 3

Compression:

Stored size: 702 Bytes

Contents

# Namespace Guts tasks
namespace :guts do
  # Namespace Guts DB tasks
  namespace :db do
    desc "Initial setup of Guts data"
    task :seed => :environment do
      type       = Guts::Type.new
      type.title = "Page"
      type.slug  = "page"
      type.save!
      
      type       = Guts::Type.new
      type.title = "Post"
      type.slug  = "post"
      type.save!
      
      category       = Guts::Category.new
      category.title = "Uncategorized"
      category.slug  = "uncategorized"
      category.save!
      
      group       = Guts::Group.new
      group.title = "Admins"
      group.slug  = "admins"
      group.save!
      
      puts "[Guts] Database seeded"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
guts-1.0.8 lib/tasks/guts_tasks.rake
guts-1.0.7 lib/tasks/guts_tasks.rake
guts-1.0.5 lib/tasks/guts_tasks.rake