Class: LatestMigration::Base
- Inherits:
-
Object
- Object
- LatestMigration::Base
- Defined in:
- lib/latest_migration/base.rb
Class Attribute Summary collapse
Class Method Summary collapse
Class Attribute Details
.editor ⇒ Object
16 17 18 |
# File 'lib/latest_migration/base.rb', line 16 def editor @editor ||= :subl end |
Class Method Details
.latest_migration_path ⇒ Object
11 12 13 14 |
# File 'lib/latest_migration/base.rb', line 11 def latest_migration_path filename = latest_migration_filename File.join(Rails.root, filename) end |
.open_latest_migration ⇒ Object
4 5 6 7 8 9 |
# File 'lib/latest_migration/base.rb', line 4 def open_latest_migration puts "Opening #{latest_migration_filename}" system editor_command rescue LatestMigration::Errors::MigrationsNotFoundError => e puts e end |