spec/support/models.rb
# Customize the JSON serialization for Elasticsearch
#
Customize the JSON serialization for Elasticsearch
Customize the JSON serialization for Elasticsearch
def as_indexed_json(options={})
    {
      id: id,
      name: name,
      tags: tags.map{ |x| {id: x.id, name: x.name} },
      created_at: created_at
    }
  end
def as_indexed_json ( options = { } ) { id : id , name : name , tags : tags . map { | x | { id : x . id , name : x . name } } , created_at : created_at } end
Customize the JSON serialization for Elasticsearch
Customize the JSON serialization for Elasticsearch
options
<not_specific>