Sha256: 0f849f52d58acb6aca064b6a9ce927d55b30fbec2040586ebd147f09ac28ed77

Contents?: true

Size: 398 Bytes

Versions: 22

Compression:

Stored size: 398 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

22 entries across 22 versions & 1 rubygems

Version Path
alchemy_cms-3.6.7 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.6.6 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.6.5 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.6.4 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.6.3 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.6.2 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.6.1 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-4.0.0.beta app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.6.0 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.5.0 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.4.2 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.5.0.rc2 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.5.0.rc1 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.4.1 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.3.3 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.3.2 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.4.0 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.4.0.rc1 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.3.1 app/serializers/alchemy/essence_text_serializer.rb
alchemy_cms-3.3.0 app/serializers/alchemy/essence_text_serializer.rb