Sha256: a8c12d1d6c3d43395bcdb635804c4756c29d6c568b6689b0e53ec0aff94b356a

Contents?: true

Size: 410 Bytes

Versions: 10

Compression:

Stored size: 410 Bytes

Contents

# -*- encoding : utf-8 -*-
module Autocomplete
  class LinkSerializer < BaseSerializer

    def initialize(collection, item, relation)
      super(collection)
      @item = item
      @relation = relation
    end

    protected

    def item_to_json(item)
      super(item).merge({
        :link_url => admin_link_uri(@item, @relation, {
          :related_id => item.id
        })
      })
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rademade_admin-0.2.2 app/serializers/autocomplete/link_serializer.rb
rademade_admin-0.2.1 app/serializers/autocomplete/link_serializer.rb
rademade_admin-0.2.0 app/serializers/autocomplete/link_serializer.rb
rademade_admin-0.1.6 app/serializers/autocomplete/link_serializer.rb
rademade_admin-0.1.5 app/serializers/autocomplete/link_serializer.rb
rademade_admin-0.1.4 app/serializers/autocomplete/link_serializer.rb
rademade_admin-0.1.3 app/serializers/autocomplete/link_serializer.rb
rademade_admin-0.1.2 app/serializers/autocomplete/link_serializer.rb
rademade_admin-0.1.1 app/serializers/autocomplete/link_serializer.rb
rademade_admin-0.1.0 app/serializers/autocomplete/link_serializer.rb