Sha256: 0dece9437e974a6b34412bd80d75fdeba13f84899ca53aa40436909275e933f8

Contents?: true

Size: 413 Bytes

Versions: 11

Compression:

Stored size: 413 Bytes

Contents

class GenerateHicubeUsers < Mongoid::Migration
  def self.up
    puts "Creating Hicube User"
    Hicube::User.create!(account: Hicube::Account.first, email: 'admin@example.com', password: 'admin', name: 'Admin User', admin: true)
  end

  def self.down
    users = Hicube::User.where(email: 'admin@example.com')
    return if users.nil? || users.empty?
    users.each do |user|
      user.delete
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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