Class: CodeLinksController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- CodeLinksController
- Defined in:
- app/controllers/code_links_controller.rb
Overview
typed: false
Instance Method Summary collapse
-
#create ⇒ Object
POST /code_links POST /code_links.json.
-
#destroy ⇒ Object
DELETE /code_links/1 DELETE /code_links/1.json.
-
#edit ⇒ Object
GET /code_links/1/edit.
-
#index ⇒ Object
GET /code_links GET /code_links.json.
-
#new ⇒ Object
GET /code_links/new.
-
#show ⇒ Object
GET /code_links/1 GET /code_links/1.json.
-
#update ⇒ Object
PATCH/PUT /code_links/1 PATCH/PUT /code_links/1.json.
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
POST /code_links POST /code_links.json
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/controllers/code_links_controller.rb', line 27 def create @code_link = CodeLink.new(code_link_params) respond_to do |format| if @code_link.save format.html { redirect_to @code_link, notice: 'Code link was successfully created.' } format.json { render :show, status: :created, location: @code_link } else format.html { render :new } format.json { render json: @code_link.errors, status: :unprocessable_entity } end end end |
#destroy ⇒ Object
DELETE /code_links/1 DELETE /code_links/1.json
57 58 59 60 61 62 63 |
# File 'app/controllers/code_links_controller.rb', line 57 def destroy @code_link.destroy respond_to do |format| format.html { redirect_to code_links_url, notice: 'Code link was successfully destroyed.' } format.json { head :no_content } end end |
#edit ⇒ Object
GET /code_links/1/edit
22 23 |
# File 'app/controllers/code_links_controller.rb', line 22 def edit end |
#index ⇒ Object
GET /code_links GET /code_links.json
7 8 9 |
# File 'app/controllers/code_links_controller.rb', line 7 def index @code_links = CodeLink.all end |
#new ⇒ Object
GET /code_links/new
17 18 19 |
# File 'app/controllers/code_links_controller.rb', line 17 def new @code_link = CodeLink.new end |
#show ⇒ Object
GET /code_links/1 GET /code_links/1.json
13 14 |
# File 'app/controllers/code_links_controller.rb', line 13 def show end |
#update ⇒ Object
PATCH/PUT /code_links/1 PATCH/PUT /code_links/1.json
43 44 45 46 47 48 49 50 51 52 53 |
# File 'app/controllers/code_links_controller.rb', line 43 def update respond_to do |format| if @code_link.update(code_link_params) format.html { redirect_to @code_link, notice: 'Code link was successfully updated.' } format.json { render :show, status: :ok, location: @code_link } else format.html { render :edit } format.json { render json: @code_link.errors, status: :unprocessable_entity } end end end |