mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Deprecate Category#url_with_id in favor of Category#url (#9972)
This commit is contained in:
@@ -41,7 +41,7 @@ module PrettyText
|
||||
|
||||
def category_hashtag_lookup(category_slug)
|
||||
if category = Category.query_from_hashtag_slug(category_slug)
|
||||
[category.url_with_id, category_slug]
|
||||
[category.url, category_slug]
|
||||
else
|
||||
nil
|
||||
end
|
||||
@@ -106,7 +106,7 @@ module PrettyText
|
||||
is_tag = text =~ /#{tag_postfix}$/
|
||||
|
||||
if !is_tag && category = Category.query_from_hashtag_slug(text)
|
||||
[category.url_with_id, text]
|
||||
[category.url, text]
|
||||
elsif (!is_tag && tag = Tag.find_by(name: text)) ||
|
||||
(is_tag && tag = Tag.find_by(name: text.gsub!("#{tag_postfix}", '')))
|
||||
["#{Discourse.base_url}/tag/#{tag.name}", text]
|
||||
|
||||
Reference in New Issue
Block a user