Class: ActualDbSchema::PhantomMigrationsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/actual_db_schema/phantom_migrations_controller.rb

Overview

Controller to display the list of phantom migrations for each database connection.

Instance Method Summary collapse

Instance Method Details

#indexObject



9
# File 'app/controllers/actual_db_schema/phantom_migrations_controller.rb', line 9

def index; end

#rollbackObject



15
16
17
18
# File 'app/controllers/actual_db_schema/phantom_migrations_controller.rb', line 15

def rollback
  handle_rollback(params[:id], params[:database])
  redirect_to phantom_migrations_path
end

#rollback_allObject



20
21
22
23
# File 'app/controllers/actual_db_schema/phantom_migrations_controller.rb', line 20

def rollback_all
  handle_rollback_all
  redirect_to phantom_migrations_path
end

#showObject



11
12
13
# File 'app/controllers/actual_db_schema/phantom_migrations_controller.rb', line 11

def show
  render file: "#{Rails.root}/public/404.html", layout: false, status: :not_found unless phantom_migration
end