mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 10:17:19 +08:00
FIX: Harmonise category body class generation on server/client (#16967)
The server-side implementation had unintentionally changed to include `-{id}` at the end of the body class name. This change meant that the JS client was unaware of the class, and didn't remove it when navigating away from the category page. This commit fixes the server-side implementation to match the client
This commit is contained in:
@ -181,7 +181,7 @@ module ApplicationHelper
|
||||
result = ApplicationHelper.extra_body_classes.to_a
|
||||
|
||||
if @category && @category.url.present?
|
||||
result << "category-#{@category.url.sub(/^\/c\//, '').gsub(/\//, '-')}"
|
||||
result << "category-#{@category.slug_path.join('-')}"
|
||||
end
|
||||
|
||||
if current_user.present? &&
|
||||
|
Reference in New Issue
Block a user