about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatt Jankowski <matt@jankowski.online>2023-03-20 15:03:44 -0400
committerGitHub <noreply@github.com>2023-03-20 20:03:44 +0100
commit7bef11630d6decac46bc006bf12e7d962dffa57e (patch)
treeaba684d3fd5a0ae363e643e0a40d32025a15f350
parentbdeb6ff18049870e76139f7434249096bc4d1fca (diff)
Remove references to non-existent actions (#24183)
-rw-r--r--.rubocop_todo.yml2
-rw-r--r--app/controllers/admin/domain_blocks_controller.rb2
-rw-r--r--app/controllers/admin/email_domain_blocks_controller.rb6
-rw-r--r--config/routes.rb2
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