mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
13 lines
279 B
Ruby
13 lines
279 B
Ruby
class CategorySerializer < BasicCategorySerializer
|
|
|
|
attributes :secure, :groups, :available_groups, :auto_close_days
|
|
|
|
def groups
|
|
@groups ||= object.groups.order("name").all.map(&:name)
|
|
end
|
|
|
|
def available_groups
|
|
Group.order("name").map(&:name) - groups
|
|
end
|
|
|
|
end
|