Sha256: ee5cbe5f1c28c0210a2f6f87abac10911d620e90fea3f2d0c74f1cada167ef84

Contents?: true

Size: 400 Bytes

Versions: 10

Compression:

Stored size: 400 Bytes

Contents

class GenerateHicubePages < Mongoid::Migration
  def self.up
    puts "Creating Hicube Index Page"
    Hicube::Page.create!(account: Hicube::Account.first, title: 'Index', order: 0, body: "body\n\tb This is index page")
  end

  def self.down
    pages = Hicube::Page.unscoped.where(title: 'Index')
    return if pages.nil? || pages.empty?
    pages.each do |page|
      page.delete
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hicube-0.0.11 lib/generators/hicube/install/templates/generate_hicube_pages.rb
hicube-0.0.10 lib/generators/hicube/install/templates/generate_hicube_pages.rb
hicube-0.0.9 lib/generators/hicube/install/templates/generate_hicube_pages.rb
hicube-0.0.8 lib/generators/hicube/install/templates/generate_hicube_pages.rb
hicube-0.0.7 lib/generators/hicube/install/templates/generate_hicube_pages.rb
hicube-0.0.6 lib/generators/hicube/install/templates/generate_hicube_pages.rb
hicube-0.0.5 lib/generators/hicube/install/templates/generate_hicube_pages.rb
hicube-0.0.4 lib/generators/hicube/install/templates/generate_hicube_pages.rb
hicube-0.0.3 lib/generators/hicube/install/templates/generate_hicube_pages.rb
hicube-0.0.2 lib/generators/hicube/install/templates/generate_hicube_pages.rb