Class: Docsmith::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Docsmith::Generators::InstallGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/generators/docsmith/install/install_generator.rb
Instance Method Summary collapse
- #create_initializer ⇒ Object
-
#create_migration_file ⇒ Object
NOTE: do not name this
create_migration.
Instance Method Details
#create_initializer ⇒ Object
27 28 29 |
# File 'lib/generators/docsmith/install/install_generator.rb', line 27 def create_initializer template "docsmith_initializer.rb.erb", "config/initializers/docsmith.rb" end |
#create_migration_file ⇒ Object
NOTE: do not name this create_migration. Rails::Generators::Migration
defines create_migration(destination, data, config) and migration_template
calls it internally, so a same-named zero-arg action method shadows it and
the generator dies with "wrong number of arguments (given 3, expected 0)".
That is what happened in 0.1.0.
20 21 22 23 24 25 |
# File 'lib/generators/docsmith/install/install_generator.rb', line 20 def create_migration_file migration_template( "create_docsmith_tables.rb.erb", "db/migrate/create_docsmith_tables.rb" ) end |