Class: PixelFire::TriggersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PixelFire::TriggersController
- Defined in:
- app/controllers/pixel_fire/triggers_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /triggers.
-
#destroy ⇒ Object
DELETE /triggers/1.
-
#edit ⇒ Object
GET /triggers/1/edit.
-
#index ⇒ Object
GET /triggers.
-
#new ⇒ Object
GET /triggers/new.
-
#show ⇒ Object
GET /triggers/1.
-
#update ⇒ Object
PATCH/PUT /triggers/1.
Instance Method Details
#create ⇒ Object
POST /triggers
26 27 28 29 30 31 32 33 34 35 |
# File 'app/controllers/pixel_fire/triggers_controller.rb', line 26 def create @trigger = Trigger.new(trigger_params) if @trigger.save @trigger.(params[:tag_ids]) redirect_to @trigger, notice: 'Trigger was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /triggers/1
48 49 50 51 |
# File 'app/controllers/pixel_fire/triggers_controller.rb', line 48 def destroy @trigger.destroy redirect_to triggers_url, notice: 'Trigger was successfully destroyed.' end |
#edit ⇒ Object
GET /triggers/1/edit
22 23 |
# File 'app/controllers/pixel_fire/triggers_controller.rb', line 22 def edit end |
#index ⇒ Object
GET /triggers
8 9 10 |
# File 'app/controllers/pixel_fire/triggers_controller.rb', line 8 def index @triggers = Trigger.all end |
#new ⇒ Object
GET /triggers/new
17 18 19 |
# File 'app/controllers/pixel_fire/triggers_controller.rb', line 17 def new @trigger = Trigger.new end |
#show ⇒ Object
GET /triggers/1
13 14 |
# File 'app/controllers/pixel_fire/triggers_controller.rb', line 13 def show end |
#update ⇒ Object
PATCH/PUT /triggers/1
38 39 40 41 42 43 44 45 |
# File 'app/controllers/pixel_fire/triggers_controller.rb', line 38 def update if @trigger.update(trigger_params) @trigger.(params[:tag_ids]) redirect_to @trigger, notice: 'Trigger was successfully updated.' else render :edit end end |