A platform for community discussion. Free, open, simple.
FIX: Generate category url correctly when slugs are empty
Daniel Waterworthcacf99e14417
diff --git a/app/models/category.rb b/app/models/category.rbindex 74a6d87fb54..8c216ac6878 100644--- a/app/models/category.rb+++ b/app/models/category.rb@@ -661,8 +661,8 @@ class Category < ActiveRecord::Baseurl = @@url_cache[self.id]unless urlurl = +"#{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] = -urlend