Module: Ladder::Searchable::File

Extended by:
ActiveSupport::Concern
Defined in:
lib/ladder/searchable/file.rb

Instance Method Summary collapse

Instance Method Details

#as_indexed_jsonHash

Serialize a Base64-encoded version of data for indexing

Returns:

  • (Hash)

    a serialized version of the file

See Also:

  • Elasticsearch::Model::Serializing#as_indexed_json


32
33
34
# File 'lib/ladder/searchable/file.rb', line 32

def as_indexed_json(*)
  { file: Base64.encode64(data) }
end