Class: Stonepath::Generators::TaskGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::NamedBase
- Base
- Stonepath::Generators::TaskGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/stonepath/task/task_generator.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#create_migration ⇒ Object
17 18 19 |
# File 'lib/generators/stonepath/task/task_generator.rb', line 17 def create_migration migration_template 'migration.rb', "db/migrate/create_#{file_name.pluralize}.rb" end |
#create_model_file ⇒ Object
13 14 15 |
# File 'lib/generators/stonepath/task/task_generator.rb', line 13 def create_model_file template('task.rb', "app/models/#{file_name}.rb") if valid_model_name?(file_name) end |