mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 02:09:54 +08:00
b9d037770c
Extension of https://github.com/discourse/discourse/pull/20057 Admin can create a public session visible to everyone. An additional checkbox is displayed for staff members.
14 lines
255 B
Ruby
14 lines
255 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SidebarSectionSerializer < ApplicationSerializer
|
|
attributes :id, :title, :links, :slug, :public
|
|
|
|
def links
|
|
object.sidebar_section_links.map(&:linkable)
|
|
end
|
|
|
|
def slug
|
|
object.title.parameterize
|
|
end
|
|
end
|