mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Merge pull request #3956 from tgxworld/fix_clashing_slug
FIX: Clashing category slug.
This commit is contained in:
commit
a055c37939
10 changed files with 65 additions and 14 deletions
|
@ -49,9 +49,8 @@ module PrettyText
|
|||
end
|
||||
|
||||
def category_hashtag_lookup(category_slug)
|
||||
if category_slug
|
||||
category = Category.find_by_slug(category_slug)
|
||||
return ['category', category.url_with_id] if category
|
||||
if category = Category.query_from_hashtag_slug(category_slug)
|
||||
['category', category.url_with_id]
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue