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

Only execute queries on 404 #12

Open
jmfederico opened this issue Mar 10, 2017 · 0 comments
Open

Only execute queries on 404 #12

jmfederico opened this issue Mar 10, 2017 · 0 comments

Comments

@jmfederico
Copy link

I'm using this gem, very helpful, but noticed that it executes the queries for every request rails receives, which means an extra DB query for every request.

I think it could be made so that it only executes when a 404 is found (no route matches), and then, and only then look for a redirect rule, this would reduce the number unnecessary of DB queries.

I'm not in a position to code this, I'm just learning Ruby, Rails and Rack work.

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

No branches or pull requests

1 participant