From 1e149172665bc5c175c752227cf61281e45f158e Mon Sep 17 00:00:00 2001 From: James Johnson Date: Tue, 4 Jun 2024 15:37:26 -0500 Subject: [PATCH] fix: missing callback ActionNotFound exception missing callback actions is the new default in rails. We're ignoring this default in production environments, but keeping it enabled in dev and test so that we can fix errors as they arise. here's what the error looks like ``` 15:30:41 web.1 | AbstractController::ActionNotFound - The edit action could not be found for the :set_transfer_request 15:30:41 web.1 | callback on TransferRequestsController, but it is listed in the controller's 15:30:41 web.1 | :only option. 15:30:41 web.1 | Raising for missing callback actions is a new default in Rails 7.1, if you'd 15:30:41 web.1 | like to turn this off you can delete the option from the environment configurations 15:30:41 web.1 | or set `config.action_controller.raise_on_missing_callback_actions` to `false`. ``` --- app/controllers/transfer_requests_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/transfer_requests_controller.rb b/app/controllers/transfer_requests_controller.rb index 59d27c8c..58f10f06 100644 --- a/app/controllers/transfer_requests_controller.rb +++ b/app/controllers/transfer_requests_controller.rb @@ -1,6 +1,6 @@ class TransferRequestsController < ApplicationController before_action :set_transfer_request, - only: %i[edit update destroy show confirm] + only: %i[destroy confirm] def index @transfer_requests_to = TransferRequest.where(to_group_id: current_user.id)