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
17 18 19 20 21 |
# File 'app/controllers/ponytail/migrations_controller.rb', line 17 def create @migration = Migration.create(migraion_params) flash[:notice] = "Migration was successfully created." respond_with @migration end |
#destroy ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/ponytail/migrations_controller.rb', line 23 def destroy @migration = Migration.find(params[:id].to_i) if @migration @migration.destroy flash[:notice] = "Migration was successfully deleted." respond_with @migration else render nothing: true, status: 404 end end |