Class: DataTaskGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- DataTaskGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/data_task/data_task_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
:nodoc:
10 11 12 13 |
# File 'lib/generators/data_task/data_task_generator.rb', line 10 def self.next_migration_number(dirname) #:nodoc: next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end |
Instance Method Details
#create_migration_file ⇒ Object
6 7 8 |
# File 'lib/generators/data_task/data_task_generator.rb', line 6 def create_migration_file migration_template "data_task.rb", "db/data_tasks/#{file_name}.rb" end |