Skip to content

Instantly share code, notes, and snippets.

@onewland
Created February 5, 2010 01:39
Show Gist options
  • Save onewland/295385 to your computer and use it in GitHub Desktop.
Save onewland/295385 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
latest_migration = Dir.entries('db/migrate/').select{ |fname| fname =~ /^\d{14}/ }.sort.last
exec "$EDITOR db/migrate/#{latest_migration}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment