Class: SlashMigrate::MigrationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- SlashMigrate::MigrationsController
- Defined in:
- app/controllers/slash_migrate/migrations_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
19 20 21 22 |
# File 'app/controllers/slash_migrate/migrations_controller.rb', line 19 def destroy @result = runner.delete(params[:version]) stream_result end |
#index ⇒ Object
3 4 5 |
# File 'app/controllers/slash_migrate/migrations_controller.rb', line 3 def index load_migrations end |
#rollback ⇒ Object
13 14 15 16 17 |
# File 'app/controllers/slash_migrate/migrations_controller.rb', line 13 def rollback @result = runner.rollback @command = "rails db:rollback" stream_result end |
#run ⇒ Object
7 8 9 10 11 |
# File 'app/controllers/slash_migrate/migrations_controller.rb', line 7 def run @result = runner.migrate @command = "rails db:migrate" stream_result end |