app/controllers/designs_controller.rb
Class has too many lines. [120/100] Open
Open
class DesignsController < ApplicationController
include AhoyActions
before_action :authenticate_user!, except: %i[show latest popular]
before_action :design, only: %i[show edit update destroy download like]
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for show is too high. [<3, 18, 0> 18.25/15] Open
Open
def show
@illustrations = BuildSerializer.new(design.preview_illustrations,
fields: { illustration: file_preview_fields })
.serialize
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric and https://en.wikipedia.org/wiki/ABC_Software_Metric.