FIX: Keep around the page when redirecting

This commit is contained in:
Robin Ward
2015-05-20 10:16:17 -04:00
parent 3859273ff7
commit 7d23826cee
2 changed files with 8 additions and 0 deletions
+3
View File
@@ -439,6 +439,9 @@ class TopicsController < ApplicationController
url << "/#{post_number}" if post_number.to_i > 0
url << ".json" if request.format.json?
page = params[:page].to_i
url << "?page=#{page}" if page != 0
redirect_to url, status: 301
end