migration_template(source, destination, config = {}) public

Creates a migration template at the given destination. The difference to the default template method is that the migration number is prepended to the destination file name.

The migration number, migration file name, migration class name are available as instance variables in the template to be rendered.

migration_template "migration.rb", "db/migrate/add_foo_to_bar.rb"
Show source
Register or log in to add new notes.