lib/searchkick.rb in searchkick-0.8.3 vs lib/searchkick.rb in searchkick-0.8.4
- old
+ new
@@ -61,9 +61,13 @@
end
def self.callbacks?
callbacks
end
+
+ def self.env
+ @env ||= ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
+ end
end
# TODO find better ActiveModel hook
ActiveModel::Callbacks.send(:include, Searchkick::Model)
ActiveRecord::Base.send(:extend, Searchkick::Model) if defined?(ActiveRecord)