Class: Ponytail::MigrationsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Ponytail::MigrationsController
- Defined in:
- app/controllers/ponytail/migrations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/ponytail/migrations_controller.rb', line 15 def create @migration = Migration.new(migraion_params) if @migration.save redirect_to :migrations, notice: 'Migration was successfully created.' else @schema = Schema.new render action: :new end end |
#index ⇒ Object
5 6 7 8 |
# File 'app/controllers/ponytail/migrations_controller.rb', line 5 def index @migrations = Migration.all @current_version = Migration.current_version end |
#migrate ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/controllers/ponytail/migrations_controller.rb', line 26 def migrate if Migration.migrate redirect_to :migrations, notice: 'Migrate was succeed.' else redirect_to :migrations, notice: 'Migrate was failed.' end end |