mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-18 22:48:32 +08:00
12 lines
273 B
Ruby
Vendored
12 lines
273 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module DiscourseTemplates::TopicsHelper
|
|
def serialize_topics(topics)
|
|
JSON.parse(
|
|
ActiveModel::ArraySerializer.new(
|
|
topics,
|
|
each_serializer: DiscourseTemplates::TemplatesSerializer,
|
|
).to_json,
|
|
)
|
|
end
|
|
end
|