From 7bef11630d6decac46bc006bf12e7d962dffa57e Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 20 Mar 2023 15:03:44 -0400 Subject: [PATCH] Remove references to non-existent actions (#24183) --- .rubocop_todo.yml | 2 -- app/controllers/admin/domain_blocks_controller.rb | 2 +- app/controllers/admin/email_domain_blocks_controller.rb | 6 ------ config/routes.rb | 2 +- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b2f8bf52c..3b4ff3597 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1670,8 +1670,6 @@ Rails/InverseOf: # Include: app/controllers/**/*.rb, app/mailers/**/*.rb Rails/LexicallyScopedActionFilter: Exclude: - - 'app/controllers/admin/domain_blocks_controller.rb' - - 'app/controllers/admin/email_domain_blocks_controller.rb' - 'app/controllers/auth/passwords_controller.rb' - 'app/controllers/auth/registrations_controller.rb' - 'app/controllers/auth/sessions_controller.rb' diff --git a/app/controllers/admin/domain_blocks_controller.rb b/app/controllers/admin/domain_blocks_controller.rb index 060db11bb..750f5c995 100644 --- a/app/controllers/admin/domain_blocks_controller.rb +++ b/app/controllers/admin/domain_blocks_controller.rb @@ -2,7 +2,7 @@ module Admin class DomainBlocksController < BaseController - before_action :set_domain_block, only: [:show, :destroy, :edit, :update] + before_action :set_domain_block, only: [:destroy, :edit, :update] def batch authorize :domain_block, :create? diff --git a/app/controllers/admin/email_domain_blocks_controller.rb b/app/controllers/admin/email_domain_blocks_controller.rb index a0a43de19..4a3228ec3 100644 --- a/app/controllers/admin/email_domain_blocks_controller.rb +++ b/app/controllers/admin/email_domain_blocks_controller.rb @@ -2,8 +2,6 @@ module Admin class EmailDomainBlocksController < BaseController - before_action :set_email_domain_block, only: [:show, :destroy] - def index authorize :email_domain_block, :index? @@ -59,10 +57,6 @@ module Admin private - def set_email_domain_block - @email_domain_block = EmailDomainBlock.find(params[:id]) - end - def set_resolved_records Resolv::DNS.open do |dns| dns.timeouts = 5 diff --git a/config/routes.rb b/config/routes.rb index 8850545ca..22ef10866 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -229,7 +229,7 @@ Rails.application.routes.draw do get '/dashboard', to: 'dashboard#index' resources :domain_allows, only: [:new, :create, :show, :destroy] - resources :domain_blocks, only: [:new, :create, :show, :destroy, :update, :edit] do + resources :domain_blocks, only: [:new, :create, :destroy, :update, :edit] do collection do post :batch end