Disable method length metrics

This commit is contained in:
dinsmol 2021-12-08 00:17:39 +03:00
parent 46fe1a2671
commit 0a715478eb

View file

@ -3,6 +3,7 @@ module Admin
before_action :set_domain, only: %i[show edit update keep]
authorize_resource
# rubocop:disable Metrics/MethodLength
def index
params[:q] ||= {}
domains = if params[:statuses_contains]
@ -30,6 +31,7 @@ module Admin
render_by_format('admin/domains/index', 'domains')
end
# rubocop:enable Metrics/MethodLength
def show
# Validation is needed to warn users
@ -40,6 +42,7 @@ module Admin
build_associations
end
# rubocop:disable Metrics/MethodLength
def update
rollback_history = @domain.json_statuses_history&.[]('admin_store_statuses_history')
dp = ignore_empty_statuses
@ -57,6 +60,7 @@ module Admin
render 'edit'
end
end
# rubocop:enable Metrics/MethodLength
def versions
@domain = Domain.where(id: params[:domain_id]).includes({ versions: :item }).first