Method: ElasticRecord::Model::ClassMethods#inherited

Defined in:
lib/elastic_record/model.rb

#inherited(child) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/elastic_record/model.rb', line 18

def inherited(child)
  super

  if child < child.base_class
    child.elastic_index = elastic_index.dup
    child.elastic_index.model = child
    child.elastic_index.mapping_type = elastic_index.mapping_type
  end
end