mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 04:43:43 +08:00
14 lines
246 B
Ruby
14 lines
246 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class SidebarSectionSerializer < ApplicationSerializer
|
||
|
attributes :id, :title, :links, :slug
|
||
|
|
||
|
def links
|
||
|
object.sidebar_section_links.map(&:linkable)
|
||
|
end
|
||
|
|
||
|
def slug
|
||
|
object.title.parameterize
|
||
|
end
|
||
|
end
|