mirror of
https://github.com/discourse/discourse.git
synced 2025-03-15 02:29:49 +08:00
Use the json boolean trick
This commit is contained in:
parent
a9d10f454b
commit
b706c59ab9
@ -38,11 +38,15 @@ class CategorySerializer < BasicCategorySerializer
|
||||
true
|
||||
end
|
||||
|
||||
def is_special
|
||||
def include_is_special?
|
||||
[SiteSetting.lounge_category_id, SiteSetting.meta_category_id, SiteSetting.staff_category_id, SiteSetting.uncategorized_category_id]
|
||||
.include? object.id
|
||||
end
|
||||
|
||||
def is_special
|
||||
true
|
||||
end
|
||||
|
||||
def include_can_delete?
|
||||
scope && scope.can_delete?(object)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user