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

Admin views random records #173

Merged
merged 4 commits into from
Feb 24, 2024
Merged

Admin views random records #173

merged 4 commits into from
Feb 24, 2024

Conversation

jonallured
Copy link
Owner

This PR adds a trick to the CRUD pages where you can pass "random" as the id of a model and get a random record. I added a link to this from the list page but also very easy to do this in the browser's URL bar. 😎

For whatever reason this seems more stable than using the current_path
directly. I discovered this while working on a spec that had a redirect.
@jonallured jonallured merged commit 9ab43f5 into main Feb 24, 2024
2 checks passed
@jonallured jonallured deleted the admin-views-random-records branch February 24, 2024 23:37
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