Commit 811108ddbeef0d9a7b22e6dfb87316802c05f2c5

Authored by Nick Plante
1 parent 50a409db

ensure that classes only get registered once

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
lib/searchkick/reindex.rb
... ... @@ -51,7 +51,8 @@ module Searchkick
51 51 end
52 52  
53 53 def self.extended(klass)
54   - (@descendents ||= []) << klass
  54 + @descendents ||= []
  55 + @descendents << klass unless @descendents.include?(klass)
55 56 end
56 57  
57 58 private
... ...