FIX: paginated category and topic pages should not have canonical tag

This commit is contained in:
Arpit Jalan
2015-09-29 17:11:21 +05:30
parent 083bdcc8aa
commit ecd93f7efb
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ class ListController < ApplicationController
end
define_method("category_#{filter}") do
canonical_url "#{Discourse.base_url}#{@category.url}"
canonical_url "#{Discourse.base_url}#{@category.url}" unless params[:page].present?
self.send(filter, category: @category.id)
end
@ -93,7 +93,7 @@ class ListController < ApplicationController
end
define_method("parent_category_category_#{filter}") do
canonical_url "#{Discourse.base_url}#{@category.url}"
canonical_url "#{Discourse.base_url}#{@category.url}" unless params[:page].present?
self.send(filter, category: @category.id)
end