mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
Use the json boolean trick
This commit is contained in:
parent
a9d10f454b
commit
b706c59ab9
1 changed files with 5 additions and 1 deletions
|
@ -38,11 +38,15 @@ class CategorySerializer < BasicCategorySerializer
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_special
|
def include_is_special?
|
||||||
[SiteSetting.lounge_category_id, SiteSetting.meta_category_id, SiteSetting.staff_category_id, SiteSetting.uncategorized_category_id]
|
[SiteSetting.lounge_category_id, SiteSetting.meta_category_id, SiteSetting.staff_category_id, SiteSetting.uncategorized_category_id]
|
||||||
.include? object.id
|
.include? object.id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def is_special
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
def include_can_delete?
|
def include_can_delete?
|
||||||
scope && scope.can_delete?(object)
|
scope && scope.can_delete?(object)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue