migration_template

migration_template(source, destination, config = {})
Instance Public methods

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.

migration_template "migration.rb", "db/migrate/add_foo_to_bar.rb"
doc_ruby_on_rails
2015-06-20 00:00:00
Comments
Leave a Comment

Please login to continue.