lib/elastics/class_proxy/base.rb in elastics-client-1.1.11 vs lib/elastics/class_proxy/base.rb in elastics-client-1.2.0
- old
+ new
@@ -3,11 +3,13 @@
class Base
attr_accessor :variables
def initialize(context, vars={})
- @variables = Vars.new({:context => context,
- :index => Conf.variables[:index]}.merge(vars))
+ v = {:context => context}
+ # support for elastics-rails index default
+ v[:index] = Conf.variables[:index] if Conf.variables.has_key?(:index)
+ @variables = Vars.new(v, vars)
end
def init; end
[:context, :index, :type].each do |meth|