Class: ThinkFeelDoDashboard::ParticipantsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- ThinkFeelDoDashboard::ParticipantsController
- Defined in:
- app/controllers/think_feel_do_dashboard/participants_controller.rb
Overview
Allows for the creation, updating, and deletion of participants
Instance Method Summary collapse
-
#create ⇒ Object
POST /think_feel_do_dashboard/participants.
-
#destroy ⇒ Object
DELETE /think_feel_do_dashboard/participants/1.
-
#edit ⇒ Object
GET /think_feel_do_dashboard/participants/1/edit.
-
#index ⇒ Object
GET /think_feel_do_dashboard/participants.
-
#new ⇒ Object
GET /think_feel_do_dashboard/participants/new.
-
#show ⇒ Object
GET /think_feel_do_dashboard/participants/1.
-
#update ⇒ Object
PATCH/PUT /think_feel_do_dashboard/participants/1.
Instance Method Details
#create ⇒ Object
POST /think_feel_do_dashboard/participants
14 15 16 17 18 19 20 21 |
# File 'app/controllers/think_feel_do_dashboard/participants_controller.rb', line 14 def create if @participant.save redirect_to @participant, notice: "Participant was successfully created." else render :new end end |
#destroy ⇒ Object
DELETE /think_feel_do_dashboard/participants/1
47 48 49 50 51 |
# File 'app/controllers/think_feel_do_dashboard/participants_controller.rb', line 47 def destroy @participant.destroy redirect_to participants_url, notice: "Participant was successfully destroyed." end |
#edit ⇒ Object
GET /think_feel_do_dashboard/participants/1/edit
32 33 |
# File 'app/controllers/think_feel_do_dashboard/participants_controller.rb', line 32 def edit end |
#index ⇒ Object
GET /think_feel_do_dashboard/participants
10 11 |
# File 'app/controllers/think_feel_do_dashboard/participants_controller.rb', line 10 def index end |
#new ⇒ Object
GET /think_feel_do_dashboard/participants/new
24 25 |
# File 'app/controllers/think_feel_do_dashboard/participants_controller.rb', line 24 def new end |
#show ⇒ Object
GET /think_feel_do_dashboard/participants/1
28 29 |
# File 'app/controllers/think_feel_do_dashboard/participants_controller.rb', line 28 def show end |
#update ⇒ Object
PATCH/PUT /think_feel_do_dashboard/participants/1
36 37 38 39 40 41 42 43 44 |
# File 'app/controllers/think_feel_do_dashboard/participants_controller.rb', line 36 def update if @participant.update(participant_params) redirect_to participant_path(@participant), notice: "Participant was successfully updated.", only: true else render :edit end end |