Skip to content

Commit

Permalink
Remove references to non-existent actions (mastodon#24183)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski authored Mar 20, 2023
1 parent bdeb6ff commit 7bef116
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/domain_blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
6 changes: 0 additions & 6 deletions app/controllers/admin/email_domain_blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down Expand Up @@ -59,10 +57,6 @@ def create

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
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
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
Expand Down

0 comments on commit 7bef116

Please sign in to comment.