Class: Banal::BrainstormsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Banal::BrainstormsController
- Defined in:
- app/controllers/banal/brainstorms_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /banal/brainstorms POST /banal/brainstorms.json.
-
#destroy ⇒ Object
DELETE /banal/brainstorms/1 DELETE /banal/brainstorms/1.json.
-
#edit ⇒ Object
GET /banal/brainstorms/1/edit.
-
#index ⇒ Object
GET /banal/brainstorms GET /banal/brainstorms.json.
-
#new ⇒ Object
GET /banal/brainstorms/new.
-
#show ⇒ Object
GET /banal/brainstorms/1 GET /banal/brainstorms/1.json.
-
#update ⇒ Object
PATCH/PUT /banal/brainstorms/1 PATCH/PUT /banal/brainstorms/1.json.
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
POST /banal/brainstorms POST /banal/brainstorms.json
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/controllers/banal/brainstorms_controller.rb', line 26 def create @banal_brainstorm = Banal::Brainstorm.new(banal_brainstorm_params) respond_to do |format| if @banal_brainstorm.save format.html { redirect_to @banal_brainstorm, notice: 'Brainstorm was successfully created.' } format.json { render :show, status: :created, location: @banal_brainstorm } else format.html { render :new } format.json { render json: @banal_brainstorm.errors, status: :unprocessable_entity } end end end |
#destroy ⇒ Object
DELETE /banal/brainstorms/1 DELETE /banal/brainstorms/1.json
56 57 58 59 60 61 62 |
# File 'app/controllers/banal/brainstorms_controller.rb', line 56 def destroy @banal_brainstorm.destroy respond_to do |format| format.html { redirect_to banal_brainstorms_url, notice: 'Brainstorm was successfully destroyed.' } format.json { head :no_content } end end |
#edit ⇒ Object
GET /banal/brainstorms/1/edit
21 22 |
# File 'app/controllers/banal/brainstorms_controller.rb', line 21 def edit end |
#index ⇒ Object
GET /banal/brainstorms GET /banal/brainstorms.json
6 7 8 |
# File 'app/controllers/banal/brainstorms_controller.rb', line 6 def index @banal_brainstorms = Banal::Brainstorm.all end |
#new ⇒ Object
GET /banal/brainstorms/new
16 17 18 |
# File 'app/controllers/banal/brainstorms_controller.rb', line 16 def new @banal_brainstorm = Banal::Brainstorm.new end |
#show ⇒ Object
GET /banal/brainstorms/1 GET /banal/brainstorms/1.json
12 13 |
# File 'app/controllers/banal/brainstorms_controller.rb', line 12 def show end |
#update ⇒ Object
PATCH/PUT /banal/brainstorms/1 PATCH/PUT /banal/brainstorms/1.json
42 43 44 45 46 47 48 49 50 51 52 |
# File 'app/controllers/banal/brainstorms_controller.rb', line 42 def update respond_to do |format| if @banal_brainstorm.update(banal_brainstorm_params) format.html { redirect_to @banal_brainstorm, notice: 'Brainstorm was successfully updated.' } format.json { render :show, status: :ok, location: @banal_brainstorm } else format.html { render :edit } format.json { render json: @banal_brainstorm.errors, status: :unprocessable_entity } end end end |