Class: DuodealerApp::Generators::UserModelGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_user_fixturesObject



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_migrationObject



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_modelObject



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_initializerObject



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