Class: Iro::AlertsController
- Inherits:
-
ApplicationController
- Object
- Wco::ApplicationController
- ApplicationController
- Iro::AlertsController
- Defined in:
- app/controllers/iro/alerts_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/controllers/iro/alerts_controller.rb', line 6 def create @alert = Iro::Alert.new(alert_params) if @alert.save redirect_to action: :index, notice: 'Alert was successfully created.' else render :new end end |
#destroy ⇒ Object
15 16 17 18 19 |
# File 'app/controllers/iro/alerts_controller.rb', line 15 def destroy @alert = Iro::Alert.find(params[:id]) @alert.destroy redirect_to action: :index, notice: 'Alert was successfully destroyed.' end |