Create ActiveRecord migration then edit in one step?

Posted by geosteve on Stack Overflow See other posts from Stack Overflow or by geosteve
Published on 2010-04-29T20:39:54Z Indexed on 2010/05/02 16:57 UTC
Read the original article Hit count: 176

Filed under:
|
|

I find myself doing this a lot:

script/generate migration my_new_migration

.. then select & copy the generated filename, then paste it into vi to actually write the migration.

Is there any way to do this in one step? i.e. when the script/generate migration runs, it creates the file the automatically opens that file in an editor?

(I'm working in an SSH terminal window on linux..)

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about migration