I discovered application templates today, and I’ve been banging my head against the wall for an hour now about generating a one-line migration.
g = Rails::Generators::Base.new
g.migration_template “migrations/enable_uuid.rb”, “db/migrate/enable_uuid.rb”
Seems to me like there should be an easy API endpoint about generating migrations. (I would’ve used the generator, but my migration doesn’t fit the generator invocation, it’s about enabling a DB extension)