Class: GimmeGimme::Generators::InstallGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::Base
- Base
- GimmeGimme::Generators::InstallGenerator
- Extended by:
- ActiveRecord::Generators::Migration
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/gimme_gimme/install/install_generator.rb
Instance Method Summary collapse
- #create_controllers ⇒ Object
- #create_initializer ⇒ Object
- #create_models ⇒ Object
- #generate_migration ⇒ Object
- #update_user_model ⇒ Object
Methods inherited from Base
Instance Method Details
#create_controllers ⇒ Object
23 24 25 |
# File 'lib/generators/gimme_gimme/install/install_generator.rb', line 23 def create_controllers directory "controllers", "app/controllers" end |
#create_initializer ⇒ Object
27 28 29 |
# File 'lib/generators/gimme_gimme/install/install_generator.rb', line 27 def create_initializer directory "initializers", "config/initializers" end |
#create_models ⇒ Object
19 20 21 |
# File 'lib/generators/gimme_gimme/install/install_generator.rb', line 19 def create_models directory "models", "app/models" end |
#generate_migration ⇒ Object
15 16 17 |
# File 'lib/generators/gimme_gimme/install/install_generator.rb', line 15 def generate_migration migration_template "create_gimme_gimme_tables.rb", "db/migrate/create_gimme_gimme_tables.rb" end |
#update_user_model ⇒ Object
31 32 33 34 35 |
# File 'lib/generators/gimme_gimme/install/install_generator.rb', line 31 def update_user_model insert_into_file "app/models/user.rb", "\ninclude GimmeGimme::User", :after => "include Clearance::User" end |