Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing callback ActionNotFound exception #181

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

jxjj
Copy link
Contributor

@jxjj jxjj commented Jun 4, 2024

This fixes a missing callback action error:

AbstractController::ActionNotFound - The edit action could not be found for the :set_transfer_request
callback on TransferRequestsController, but it is listed in the controller's
:only option.
Raising for missing callback actions is a new default in Rails 7.1, if you'd
like to turn this off you can delete the option from the environment configurations
or set `config.action_controller.raise_on_missing_callback_actions` to `false`.

We're ignoring this default in production environments, but kept it enabled in dev and test so that we can fix errors as they arise.

edit, update, and show mehtods don't exist on this controller, so they're removed from the before_action.

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`.
```
@jxjj jxjj requested a review from cmcfadden June 4, 2024 20:40
@jxjj jxjj self-assigned this Jun 4, 2024
@jxjj jxjj merged commit d52f238 into develop Jun 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants