rubocop corrections
This commit is contained in:
parent
c63c6bc448
commit
de29815686
72 changed files with 468 additions and 311 deletions
|
@ -1,6 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Authors controller
|
||||
class AuthorsController < ApplicationController
|
||||
before_action :ensure_admin
|
||||
before_action :set_author, only: [:edit, :update]
|
||||
before_action :set_author, only: %i[edit update]
|
||||
|
||||
def index
|
||||
@authors = Author.all
|
||||
|
@ -11,9 +14,7 @@ class AuthorsController < ApplicationController
|
|||
end
|
||||
|
||||
def update
|
||||
if @author.update(author_params)
|
||||
redirect_to '/authors'
|
||||
end
|
||||
redirect_to '/authors' if @author.update(author_params)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue