5

是否可以配置 Rails 以便在运行后rails g migration name_of_migration自动在 TextMate 中打开该文件?

4

2 回答 2

5

你可以用这个创建一个别名:

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

然后从您的终端运行它:

last_migration
于 2013-01-23T20:17:52.557 回答
2

不,但您可以使用以下快捷方式在 Textmate 中生成迁移 -

“Shift + Control + M”

于 2010-12-16T22:03:02.030 回答