Class: GenerateHicubeAccounts

Inherits:
Mongoid::Migration
  • Object
show all
Defined in:
lib/generators/hicube/install/templates/generate_hicube_accounts.rb

Class Method Summary collapse

Class Method Details

.downObject



9
10
11
# File 'lib/generators/hicube/install/templates/generate_hicube_accounts.rb', line 9

def self.down
  Hicube::Account.first.delete unless Hicube::Account.first.nil?
end

.upObject



2
3
4
5
6
7
# File 'lib/generators/hicube/install/templates/generate_hicube_accounts.rb', line 2

def self.up
  puts "Creating Hicube Account"
  Hicube::Account.create! ga: 'GA', domain: 'localhost:3000', 
    notify_email_html: "Please insert here HTML component of notification template", 
    notify_email_text: "Please insert here TEXT component of notification template"
end