Sha256: 1ddb806abd13af05414fd654c8f7a06108ba656ce332961f82da49ee56fba441

Contents?: true

Size: 379 Bytes

Versions: 9

Compression:

Stored size: 379 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  class ElementSerializer < ActiveModel::Serializer
    self.root = false

    attributes :id,
      :name,
      :position,
      :page_id,
      :cell_id,
      :tag_list,
      :created_at,
      :updated_at,
      :ingredients,
      :content_ids

    def ingredients
      object.contents.collect(&:serialize)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-4.0.6 app/serializers/alchemy/element_serializer.rb
alchemy_cms-4.0.5 app/serializers/alchemy/element_serializer.rb
alchemy_cms-4.0.4 app/serializers/alchemy/element_serializer.rb
alchemy_cms-4.0.3 app/serializers/alchemy/element_serializer.rb
alchemy_cms-4.0.2 app/serializers/alchemy/element_serializer.rb
alchemy_cms-4.0.1 app/serializers/alchemy/element_serializer.rb
alchemy_cms-4.0.0 app/serializers/alchemy/element_serializer.rb
alchemy_cms-4.0.0.rc2 app/serializers/alchemy/element_serializer.rb
alchemy_cms-4.0.0.rc1 app/serializers/alchemy/element_serializer.rb