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

Add Wildcard Route to Prevent ActionController::RoutingError #730

Draft
wants to merge 1 commit into
base: integration
Choose a base branch
from

Conversation

aaronskiba
Copy link
Collaborator

Fixes #727

Changes proposed in this PR:

According to https://stackoverflow.com/a/37174557/17842948, "The ActionController::RoutingError is raised when Rails tries to match the request with a route. This happens before Rails even initializes a controller - thus your ApplicationController never has a chance to rescue the exception."

This fix prevents the ActionController::RoutingError by adding a catch-all/wildcard route to config/routes.rb.

This fix comes from the following link: https://rollbar.com/blog/ruby-on-rails-routingerror/

According to https://stackoverflow.com/a/37174557/17842948, "The ActionController::RoutingError is raised when Rails tries to match the request with a route. This happens before Rails even initializes a controller - thus your ApplicationController never has a chance to rescue the exception."

This fix prevents the ActionController::RoutingError by adding a catch-all/wildcard route to config/routes.rb.
Copy link

1 Error
🚫 Please include a CHANGELOG entry. You can find it at CHANGELOG.md.

Generated by 🚫 Danger

@aaronskiba aaronskiba changed the title Add Wilcard Route to Prevent ActionController::RoutingError Add Wildcard Route to Prevent ActionController::RoutingError May 2, 2024
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.

1 participant