Sha256: 989054e92cf02074ad20275f644a23cc9a57ac59e1498a4d64bd6941a819a248
Contents?: true
Size: 556 Bytes
Versions: 33
Compression:
Stored size: 556 Bytes
Contents
# frozen_string_literal: true module Decidim module Pages # This class serializes the specific data in each Page. This is the page # data outside of the component settings. class DataSerializer < Decidim::Exporters::Serializer include Decidim::TranslationsHelper # Serializes the page data for this component. # # @return [Hash] The serialized data def serialize page = Page.find_by(component: resource) { body: page&.body || empty_translatable } end end end end
Version data entries
33 entries across 33 versions & 1 rubygems