Skip to content

Instantly share code, notes, and snippets.

@uhlenbrock
Created March 13, 2014 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uhlenbrock/9537099 to your computer and use it in GitHub Desktop.
Save uhlenbrock/9537099 to your computer and use it in GitHub Desktop.
Open the last migration created in a rails project
atom.workspaceView.command 'last-migration', ->
migrate_directory = atom.project.getRootDirectory()
migrate_directory.path = "#{migrate_directory.path}/db/migrate"
last_migration = migrate_directory.getEntriesSync().pop()
atom.open
pathsToOpen: [last_migration.path]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment