Line #1 –
convention:
Style/Documentation: Missing top-level class documentation comment.
class BooksController < ApplicationController
Line #2 –
convention:
Style/SymbolArray: Use %i
or %I
for an array of symbols.
before_action :set_book, only: [:show, :edit, :update, :destroy]
Line #12 –
convention:
Style/EmptyMethod: Put empty method definitions on a single line.
def show
Line #21 –
convention:
Style/EmptyMethod: Put empty method definitions on a single line.
def edit
Line #31 –
convention:
Metrics/LineLength: Line is too long. [83/80]
format.html { redirect_to @book, notice: 'Book was successfully created.' }
Line #45 –
convention:
Metrics/LineLength: Line is too long. [83/80]
format.html { redirect_to @book, notice: 'Book was successfully updated.' }
Line #59 –
convention:
Metrics/LineLength: Line is too long. [87/80]
format.html { redirect_to books_url, notice: 'Book was successfully destroyed.' }
Line #64 –
convention:
Layout/EmptyLinesAroundAccessModifier: Keep a blank line before and after private
.
private
Line #66 –
convention:
Layout/IndentationConsistency: Inconsistent indentation detected.
def set_book
Line #70 –
convention:
Metrics/LineLength: Line is too long. [88/80]
# Never trust parameters from the scary internet, only allow the white list through.
Line #71 –
convention:
Layout/IndentationConsistency: Inconsistent indentation detected.
def book_params