diff --git a/lib/chewy.rb b/lib/chewy.rb index b4f91d12e..fdff1bf36 100644 --- a/lib/chewy.rb +++ b/lib/chewy.rb @@ -14,7 +14,7 @@ require 'active_support/core_ext/object/inclusion' require 'active_support/core_ext/string/inflections' -require 'i18n/core_ext/hash' +require 'active_support/core_ext/hash' require 'chewy/backports/deep_dup' unless Object.respond_to?(:deep_dup) require 'singleton' require 'base64' diff --git a/lib/chewy/index.rb b/lib/chewy/index.rb index 7c3454461..b415c7167 100644 --- a/lib/chewy/index.rb +++ b/lib/chewy/index.rb @@ -236,7 +236,7 @@ def mappings_hash raise "Type mapping must have 1 entry: #{type_mapping}" end - fields = type_mapping.reduce[1][:properties] + fields = type_mapping.reduce(:merge)[1][:properties] fields.each do |field_name, field_settings| existing_field_settings = mappings[:properties][field_name] if existing_field_settings && existing_field_settings != field_settings diff --git a/lib/chewy/rspec/update_index.rb b/lib/chewy/rspec/update_index.rb index 1e505eba9..b8946df81 100644 --- a/lib/chewy/rspec/update_index.rb +++ b/lib/chewy/rspec/update_index.rb @@ -1,4 +1,4 @@ -require 'i18n/core_ext/hash' +require 'active_support/core_ext/hash' # Rspec matcher `update_index` # To use it - add `require 'chewy/rspec'` to the `spec_helper.rb`