Flowdock
method

migration_template

Importance_1
v3.2.8 - Show latest stable - 0 notes - Class: Rails::Generators::Migration
migration_template(source, destination=nil, config={}) public

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

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

Examples

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