From b82726b029f04603b7e2e769bd3204fa49af75c1 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 18 Aug 2014 12:35:31 +1000 Subject: [PATCH] FIX: incorrect redirection code --- app/controllers/topics_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index 25bcff8d089..9e4cc9ac415 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -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