mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 21:16:12 +02:00
Fixed codeclimate issues
This commit is contained in:
parent
cc4d4d0e1f
commit
7f0787b27f
2 changed files with 10 additions and 16 deletions
|
@ -5,6 +5,7 @@ module Admin
|
|||
before_action :set_domain, only: %i[show edit update download keep]
|
||||
authorize_resource
|
||||
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
def index
|
||||
params[:q] ||= {}
|
||||
domains = Domain.includes(:registrar, :registrant).joins(:registrar, :registrant)
|
||||
|
@ -22,16 +23,6 @@ module Admin
|
|||
render_by_format('admin/domains/index', 'domains')
|
||||
end
|
||||
|
||||
def show
|
||||
# Validation is needed to warn users
|
||||
@domain.validate
|
||||
end
|
||||
|
||||
def edit
|
||||
build_associations
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
def update
|
||||
rollback_history = @domain.json_statuses_history&.[]('admin_store_statuses_history')
|
||||
dp = ignore_empty_statuses
|
||||
|
@ -51,6 +42,15 @@ module Admin
|
|||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
|
||||
def show
|
||||
# Validation is needed to warn users
|
||||
@domain.validate
|
||||
end
|
||||
|
||||
def edit
|
||||
build_associations
|
||||
end
|
||||
|
||||
def versions
|
||||
@domain = Domain.where(id: params[:domain_id]).includes({ versions: :item }).first
|
||||
@versions = @domain.versions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue