Module: Autocomplete

Defined in:
app/serializers/autocomplete/base_serializer.rb,
app/serializers/autocomplete/link_serializer.rb

Overview

Class: AutocompleteSerializer

Creates hash (ready for JSON serialization) with pairs of id => value to show in the autocomplete select UI.

The output format of to_json is optimized for ‘Select2’ autocomplete UI.

It would generate JSON of models :id and :text. Text is determined by #to_autocomplete method, or by #to_s.

Defined Under Namespace

Classes: BaseSerializer, LinkSerializer