Commit c861f483064ce0291ec9690cf4d78a3bf235fc6a

Authored by Andrew Kane
1 parent e3967bee

Use the same order Rails does to check environment - for #94

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/searchkick/model.rb
... ... @@ -10,7 +10,7 @@ module Searchkick
10 10 callbacks = options.has_key?(:callbacks) ? options[:callbacks] : true
11 11  
12 12 class_variable_set :@@searchkick_options, options.dup
13   - class_variable_set :@@searchkick_env, ENV["RACK_ENV"] || ENV["RAILS_ENV"] || "development"
  13 + class_variable_set :@@searchkick_env, ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
14 14 class_variable_set :@@searchkick_klass, self
15 15 class_variable_set :@@searchkick_callbacks, callbacks
16 16 class_variable_set :@@searchkick_index, options[:index_name] || [options[:index_prefix], model_name.plural, searchkick_env].compact.join("_")
... ...