FIX: incorrect redirection code

This commit is contained in:
Sam 2014-08-18 12:35:31 +10:00
parent 9ba8b29e98
commit b82726b029
1 changed files with 1 additions and 1 deletions

View File

@ -382,7 +382,7 @@ class TopicsController < ApplicationController
def redirect_to_correct_topic(topic, post_number=nil)
url = topic.relative_url
url << "/" + post_number if post_number.to_i > 0
url << "/#{post_number}" if post_number.to_i > 0
url << ".json" if request.format.json?
redirect_to url, status: 301