Sha256: 8f8099cf0398175ffd3af7b1a407ff0c476cedf3cc497208b5257e6c5e96d687

Contents?: true

Size: 477 Bytes

Versions: 8

Compression:

Stored size: 477 Bytes

Contents

# frozen_string_literal: true

require 'active_model/serializer/field'

module ActiveModel
  class Serializer
    # Holds all the data about a serializer link
    #
    # @example
    #   class PostSerializer < ActiveModel::Serializer
    #     link :callback, if: :internal? do
    #       object.callback_link
    #     end
    #
    #     def internal?
    #       instance_options[:internal] == true
    #     end
    #   end
    #
    class Link < Field
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
active_model_serializers-0.10.15 lib/active_model/serializer/link.rb
active_model_serializers-0.10.14 lib/active_model/serializer/link.rb
active_model_serializers-0.10.13 lib/active_model/serializer/link.rb
active_model_serializers-0.10.12 lib/active_model/serializer/link.rb
active_model_serializers-0.10.11 lib/active_model/serializer/link.rb
active_model_serializers-0.10.10 lib/active_model/serializer/link.rb
active_model_serializers_custom-0.10.90 lib/active_model/serializer/link.rb
active_model_serializers-0.10.9 lib/active_model/serializer/link.rb