Skip to content

Commit 57644fc

Browse files
committedJun 11, 2020
Redirect to appropriate Migrations Guide version
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.
1 parent 302f017 commit 57644fc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎config/nginx.conf

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ server {
4141

4242
rewrite /contributing_to_rails.html /contributing_to_ruby_on_rails.html permanent;
4343
rewrite /contribute.html /contributing_to_ruby_on_rails.html permanent;
44+
rewrite ^((?!/v[2-3]\.|/v4\.[0-1]).*)/migrations.html$ $1/active_record_migrations.html permanent;
4445
rewrite ^(.*)/constant_autoloading_and_reloading.html$ $1/autoloading_and_reloading_constants.html permanent;
4546

4647
location ~ ^/v\d {

0 commit comments

Comments
 (0)
Please sign in to comment.