Sha256: 2c8e5f0e89f15be778456439db19ec625df39b910953f9d6051dd3e1fcd07a9d
Contents?: true
Size: 875 Bytes
Versions: 14
Compression:
Stored size: 875 Bytes
Contents
# frozen_string_literal: true class <%= @index_name %> < <%= @base_class %> module Documents class <%= @repo.camelize if @repo %>Document < Esse::Document <%- if @cli_options[:active_record] -%> delegate :id, to: :object <%- else -%> def id object.id end <%- end -%> def source { name: object.name, <%- if @repo && defined?(Elasticsearch::VERSION) && Elasticsearch::VERSION > '5' -%> type: "<%= @repo %>", <%- end -%> <%- if @cli_options[:active_record] -%> created_at: object.created_at, updated_at: object.updated_at, <%- end -%> } end <%- if @repo && defined?(Elasticsearch::VERSION) && Elasticsearch::VERSION <= '5' -%> def type '<%= @repo %>' end <%- end -%> end end end
Version data entries
14 entries across 14 versions & 1 rubygems