Is it possible to configure Rails so that after running rails g migration name_of_migration
, it automatically opens that file in TextMate?
automatically open Rails generate migration file in editor
Asked Answered
yeap, you can hack the source %) –
Dreddy
If my solution is the right one, would you mind selecting it? –
Ofilia
You could create an alias with this:
alias last_migration='ls db/migrate/* | tail -n1 | xargs open -a "Textmate"'
and then run it from your terminal:
last_migration
I've to do add
*.rb
to the ls
filter because it didn't worked for me: alias last_migration='ls db/migrate/*.rb | tail -n1 | xargs open -a "MyEditor"'
–
Callan No, but you can generate migration in Textmate, using the following shortcut -
"Shift + Control + M"
Doesn't work for me. Do I need a special bundle or something? –
Singlehandedly
you need the ruby on rails bundle –
Lindly
© 2022 - 2024 — McMap. All rights reserved.