discourse/app/serializers/sidebar_section_serializer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
255 B
Ruby
Raw Normal View History

# 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