Class: DuodealerApp::Generators::AccountModelGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/duodealer_app/account_model/account_model_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_account_fixturesObject



22
23
24
# File 'lib/generators/duodealer_app/account_model/account_model_generator.rb', line 22

def 
  copy_file "accounts.yml", "test/fixtures/accounts.yml"
end

#create_account_migrationObject



14
15
16
# File 'lib/generators/duodealer_app/account_model/account_model_generator.rb', line 14

def 
  migration_template "db/migrate/create_accounts.erb", "db/migrate/create_accounts.rb"
end

#create_account_modelObject



10
11
12
# File 'lib/generators/duodealer_app/account_model/account_model_generator.rb', line 10

def 
  copy_file "account.rb", "app/models/account.rb"
end

#update_duodealer_app_initializerObject



18
19
20
# File 'lib/generators/duodealer_app/account_model/account_model_generator.rb', line 18

def update_duodealer_app_initializer
  gsub_file "config/initializers/duodealer_app.rb", "DuodealerApp::InMemorySessionStore", "account"
end