Class: Elastics::ModelsIndices

Inherits:
Indices
  • Object
show all
Defined in:
lib/elastics/models_indices.rb

Instance Method Summary collapse

Constructor Details

#initialize(config_path) ⇒ ModelsIndices



4
5
6
7
8
9
10
11
# File 'lib/elastics/models_indices.rb', line 4

def initialize(config_path)
  default = {}.extend Struct::Mergeable
  (Conf.elastics_models + Conf.elastics_active_models).each do |m|
    m = eval"::#{m}" if m.is_a?(String)
    default.deep_merge! m.elastics.default_mapping
  end
  replace default.deep_merge(super)
end