A lot :)
This commit is contained in:
parent
aad67af0d1
commit
63fc206c27
153 changed files with 2043 additions and 646 deletions
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class LinksController < ApplicationController
|
||||
before_action :set_link, only: %i[show edit update destroy]
|
||||
|
||||
|
|
@ -7,8 +9,7 @@ class LinksController < ApplicationController
|
|||
end
|
||||
|
||||
# GET /links/1
|
||||
def show
|
||||
end
|
||||
def show; end
|
||||
|
||||
# GET /links/new
|
||||
def new
|
||||
|
|
@ -16,15 +17,14 @@ class LinksController < ApplicationController
|
|||
end
|
||||
|
||||
# GET /links/1/edit
|
||||
def edit
|
||||
end
|
||||
def edit; end
|
||||
|
||||
# POST /links
|
||||
def create
|
||||
@link = Link.new(link_params)
|
||||
|
||||
if @link.save
|
||||
redirect_to @link, notice: 'Link was successfully created.'
|
||||
redirect_to @link, notice: "Link was successfully created."
|
||||
else
|
||||
render :new, status: :unprocessable_entity
|
||||
end
|
||||
|
|
@ -33,7 +33,7 @@ class LinksController < ApplicationController
|
|||
# PATCH/PUT /links/1
|
||||
def update
|
||||
if @link.update(link_params)
|
||||
redirect_to @link, notice: 'Link was successfully updated.', status: :see_other
|
||||
redirect_to @link, notice: "Link was successfully updated.", status: :see_other
|
||||
else
|
||||
render :edit, status: :unprocessable_entity
|
||||
end
|
||||
|
|
@ -42,7 +42,7 @@ class LinksController < ApplicationController
|
|||
# DELETE /links/1
|
||||
def destroy
|
||||
@link.destroy!
|
||||
redirect_to links_url, notice: 'Link was successfully destroyed.', status: :see_other
|
||||
redirect_to links_url, notice: "Link was successfully destroyed.", status: :see_other
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue