Sha256: e50addea1ff006a943db6e0a244ba94b5a0ed5009a7c566c33b89693cb98320b

Contents?: true

Size: 399 Bytes

Versions: 27

Compression:

Stored size: 399 Bytes

Contents

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

    attributes :id,
      :body,
      :link,
      :created_at,
      :updated_at

    def link
      return if object.link.blank?
      {
        url: object.link,
        title: object.link_title,
        css_class: object.link_class_name,
        target: object.link_target
      }
    end

  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
alchemy_cms-3.2.1 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.3 app/serializers/alchemy/essence_text_serializer.rb
lc_alchemy_cms-3.2.1 app/serializers/alchemy/essence_text_serializer.rb
lc_alchemy_cms-3.2.0 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.2.0 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.2.0.rc1 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.2.0.beta app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.1 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.0.4 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0.rc3 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0.rc2 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0.rc1 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0.beta6 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0.beta5 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0.beta4 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.0.3 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0.beta3 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0.beta2 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.1.0.beta1 app/serializers/alchemy/essence_text_serializer.rb