Automatically open Rails, creates a migration file in the editor

Is it possible to configure Rails so that after starting rails g migration name_of_migrationit automatically opens this file in TextMate?

+5
source share
2 answers

You can create an alias with this:

alias last_migration='ls db/migrate/* | tail -n1 | xargs open -a "Textmate"'

and then run it from the terminal:

last_migration
+5
source

No, but you can generate a migration to Textmate using the following shortcut -

"Shift + Control + M"

+2
source

All Articles