Class: DuodealerApp::Generators::AccountModelGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DuodealerApp::Generators::AccountModelGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/duodealer_app/account_model/account_model_generator.rb
Instance Method Summary collapse
- #create_account_fixtures ⇒ Object
- #create_account_migration ⇒ Object
- #create_account_model ⇒ Object
- #update_duodealer_app_initializer ⇒ Object
Instance Method Details
#create_account_fixtures ⇒ Object
22 23 24 |
# File 'lib/generators/duodealer_app/account_model/account_model_generator.rb', line 22 def create_account_fixtures copy_file "accounts.yml", "test/fixtures/accounts.yml" end |
#create_account_migration ⇒ Object
14 15 16 |
# File 'lib/generators/duodealer_app/account_model/account_model_generator.rb', line 14 def create_account_migration migration_template "db/migrate/create_accounts.erb", "db/migrate/create_accounts.rb" end |
#create_account_model ⇒ Object
10 11 12 |
# File 'lib/generators/duodealer_app/account_model/account_model_generator.rb', line 10 def create_account_model copy_file "account.rb", "app/models/account.rb" end |
#update_duodealer_app_initializer ⇒ Object
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 |