Commit abe26b51adf82a082dbc465aba269b26ff77f68d

Authored by Andrew Kane
1 parent 84173f2d

Prevent users from adding searchkick to a model multiple times

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
lib/searchkick/model.rb
... ... @@ -2,6 +2,8 @@ module Searchkick
2 2 module Model
3 3  
4 4 def searchkick(options = {})
  5 + raise "Only call searchkick once per model" if respond_to?(:searchkick_index)
  6 +
5 7 class_eval do
6 8 cattr_reader :searchkick_options, :searchkick_env, :searchkick_klass
7 9  
... ...