Sha256: 34aa015c102a87f121390e594850e446a8ff40811c7eae746201e0210ea157e0

Contents?: true

Size: 408 Bytes

Versions: 9

Compression:

Stored size: 408 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  class PageSerializer < ActiveModel::Serializer
    attributes :id,
      :name,
      :urlname,
      :page_layout,
      :title,
      :language_code,
      :meta_keywords,
      :meta_description,
      :tag_list,
      :created_at,
      :updated_at,
      :status

    has_many :elements

    def elements
      object.elements.published
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-4.3.2 app/serializers/alchemy/page_serializer.rb
alchemy_cms-4.2.4 app/serializers/alchemy/page_serializer.rb
alchemy_cms-4.3.1 app/serializers/alchemy/page_serializer.rb
alchemy_cms-4.2.3 app/serializers/alchemy/page_serializer.rb
alchemy_cms-4.3.0 app/serializers/alchemy/page_serializer.rb
alchemy_cms-4.2.2 app/serializers/alchemy/page_serializer.rb
alchemy_cms-4.2.1 app/serializers/alchemy/page_serializer.rb
alchemy_cms-4.2.0 app/serializers/alchemy/page_serializer.rb
alchemy_cms-4.2.0.rc1 app/serializers/alchemy/page_serializer.rb