Class: DuodealerApp::Generators::UserModelGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DuodealerApp::Generators::UserModelGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/duodealer_app/user_model/user_model_generator.rb
Instance Method Summary collapse
- #create_user_fixtures ⇒ Object
- #create_user_migration ⇒ Object
- #create_user_model ⇒ Object
- #update_duodealer_app_initializer ⇒ Object
Instance Method Details
#create_user_fixtures ⇒ Object
22 23 24 |
# File 'lib/generators/duodealer_app/user_model/user_model_generator.rb', line 22 def create_user_fixtures copy_file "users.yml", "test/fixtures/users.yml" end |
#create_user_migration ⇒ Object
14 15 16 |
# File 'lib/generators/duodealer_app/user_model/user_model_generator.rb', line 14 def create_user_migration migration_template "db/migrate/create_users.erb", "db/migrate/create_users.rb" end |
#create_user_model ⇒ Object
10 11 12 |
# File 'lib/generators/duodealer_app/user_model/user_model_generator.rb', line 10 def create_user_model copy_file "user.rb", "app/models/user.rb" end |
#update_duodealer_app_initializer ⇒ Object
18 19 20 |
# File 'lib/generators/duodealer_app/user_model/user_model_generator.rb', line 18 def update_duodealer_app_initializer gsub_file "config/initializers/duodealer_app.rb", "DuodealerApp::InMemorySessionStore", "User" end |