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 guide redirects #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jonathanhefner
Copy link
Member

This PR is split into two commits, which solve the following problems:

  1. The v4.2 and v5.0 guides are the only guides which link to constant_autoloading_and_reloading.html. However, visiting that path in either version currently redirects to the stable version of autoloading_and_reloading_constants.html, which is a Zeitwerk guide as of Rails 6.0.

  2. migrations.html was renamed to active_record_migrations.html in Rails 4.2, but the v4.2 and v5.0 guides link to the old path. Visiting migrations.html in v4.2 or later, including stable, currently redirects to the edge version of active_record_migrations.html, which may go unnoticed and cause confusion.

⚠️ I have only tested the regexes here. I do not have all the rails-docs-server dependencies installed at the moment, and so have not tested the conf itself. I am hoping some very generous person will double-check these changes. 🙏

The v4.2 and v5.0 guides are the only guides which link to
`constant_autoloading_and_reloading.html`.  However, visiting that path
in either version currently redirects to the stable version of
`autoloading_and_reloading_constants.html`, which is a Zeitwerk guide as
of Rails 6.0.

This commit preserves the guide version when redirecting.
Follow-up to 6eafc6e.

`migrations.html` was renamed to `active_record_migrations.html` in
Rails 4.2, but the v4.2 and v5.0 guides link to the old path.  Visiting
`migrations.html` in v4.2 or later, including stable, currently
redirects to the edge version of `active_record_migrations.html`, which
may go unnoticed and cause confusion.

This commit ensures `migrations.html` redirects to the appropriate
`active_record_migrations.html` for the v4.2 and later guides.
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