class TasksMigration::Generators::TaskGenerator

Public Instance Methods

add_task() click to toggle source
# File lib/generators/tasks_migration/task_generator.rb, line 11
def add_task
  task_file_suffix = "_task" unless options["no-suffix"]
  task_file_name = "#{name.underscore}#{task_file_suffix}.rb"

  template "task.rb", "app/migration_tasks/#{task_file_name}"
end