Class: Illy::FeedbacksController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Illy::FeedbacksController
- Defined in:
- app/controllers/illy/feedbacks_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /feedbacks.
-
#destroy ⇒ Object
DELETE /feedbacks/1.
-
#edit ⇒ Object
GET /feedbacks/1/edit.
-
#index ⇒ Object
GET /feedbacks.
-
#new ⇒ Object
GET /feedbacks/new.
-
#show ⇒ Object
GET /feedbacks/1.
-
#update ⇒ Object
PATCH/PUT /feedbacks/1.
Instance Method Details
#create ⇒ Object
POST /feedbacks
26 27 28 29 30 31 32 33 34 |
# File 'app/controllers/illy/feedbacks_controller.rb', line 26 def create @feedback = Feedback.new(feedback_params) if @feedback.save redirect_to @feedback, notice: 'Feedback was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /feedbacks/1
46 47 48 49 |
# File 'app/controllers/illy/feedbacks_controller.rb', line 46 def destroy @feedback.destroy redirect_to feedbacks_url, notice: 'Feedback was successfully destroyed.' end |
#edit ⇒ Object
GET /feedbacks/1/edit
22 23 |
# File 'app/controllers/illy/feedbacks_controller.rb', line 22 def edit end |
#index ⇒ Object
GET /feedbacks
8 9 10 |
# File 'app/controllers/illy/feedbacks_controller.rb', line 8 def index @feedbacks = Feedback.all end |
#new ⇒ Object
GET /feedbacks/new
17 18 19 |
# File 'app/controllers/illy/feedbacks_controller.rb', line 17 def new @feedback = Feedback.new end |
#show ⇒ Object
GET /feedbacks/1
13 14 |
# File 'app/controllers/illy/feedbacks_controller.rb', line 13 def show end |
#update ⇒ Object
PATCH/PUT /feedbacks/1
37 38 39 40 41 42 43 |
# File 'app/controllers/illy/feedbacks_controller.rb', line 37 def update if @feedback.update(feedback_params) redirect_to @feedback, notice: 'Feedback was successfully updated.' else render :edit end end |