Sha256: b149d451a762def19f39603c0ab0a2408e0ec489db99945aa9b5c419bf6a827a

Contents?: true

Size: 404 Bytes

Versions: 7

Compression:

Stored size: 404 Bytes

Contents

module Spree
  class TaxonSerializer < Spree::BaseSerializer
    attributes :name, :permalink, :position, :description, :meta_title, :links,
               :meta_description, :meta_keywords, :depth

    belongs_to :taxonomy
    belongs_to :parent, serializer: TaxonSerializer
    has_many :children, serializer: TaxonSerializer

    private

    def links
      image_links object.icon
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
solidus_json_api-0.3.0 app/serializers/spree/taxon_serializer.rb
spree_api_v2-0.2.2 app/serializers/spree/taxon_serializer.rb
solidus_api_v2-0.2.2 app/serializers/spree/taxon_serializer.rb
solidus_api_v2-0.2.1 app/serializers/spree/taxon_serializer.rb
spree_api_v2-0.2.1 app/serializers/spree/taxon_serializer.rb
spree_api_v2-0.2.0 app/serializers/spree/taxon_serializer.rb
solidus_api_v2-0.2.0 app/serializers/spree/taxon_serializer.rb