Class: Abraham::Generators::InstallGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- Abraham::Generators::InstallGenerator
- Defined in:
- lib/generators/abraham/install_generator.rb
Instance Method Summary collapse
-
#copy_files ⇒ Object
Copies the migration template to db/migrate.
- #create_initializer ⇒ Object
Instance Method Details
#copy_files ⇒ Object
Copies the migration template to db/migrate.
16 17 18 19 |
# File 'lib/generators/abraham/install_generator.rb', line 16 def copy_files return if ['skip-migration'] migration_template 'migration.rb', 'db/migrate/create_abraham_histories.rb' end |
#create_initializer ⇒ Object
21 22 23 24 25 |
# File 'lib/generators/abraham/install_generator.rb', line 21 def create_initializer return if ['skip-initializer'] copy_file 'initializer.rb', 'config/initializers/abraham.rb' copy_file 'abraham.yml', 'config/abraham.yml' end |