mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 18:36:35 +08:00
FIX: Generate category url correctly when slugs are empty
This commit is contained in:
parent
8d34f4bbd9
commit
cacf99e144
|
@ -661,8 +661,8 @@ class Category < ActiveRecord::Base
|
|||
url = @@url_cache[self.id]
|
||||
unless url
|
||||
url = +"#{Discourse.base_uri}/c"
|
||||
url << "/#{parent_category.slug}" if parent_category_id
|
||||
url << "/#{slug}"
|
||||
url << "/#{parent_category.slug_for_url}" if parent_category_id
|
||||
url << "/#{slug_for_url}"
|
||||
@@url_cache[self.id] = -url
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user