# File lib/generators/data_mapper/migration/migration_generator.rb, line 11 def create_migration_file set_local_assigns! migration_template "migration.rb", "db/migrate/#{file_name}.rb" end
# File lib/generators/data_mapper/migration/migration_generator.rb, line 20 def set_local_assigns! if file_name =~ /^(add|remove|drop)_.*_(?:to|from)_(.*)/ @migration_action = $1 == 'add' ? 'add' : 'drop' @table_name = $2.pluralize end end