algoliasearch-rails 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/VERSION +1 -1
- data/algoliasearch-rails.gemspec +1 -1
- data/lib/algoliasearch-rails.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d428c61f7c4dc2a09a1cf096ea4a3ff8f473a371
|
4
|
+
data.tar.gz: 6ff620725b76b9d753a6a01078c216168e33d0ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd7bf16ad2c6ca12e1850b5cc0e33c6990a03bae6aca68c6b97185fef5d1e842b6a6f56c5f7700b85936c8c26ca136542cf68b334fec1bde0eadd77601e24d79
|
7
|
+
data.tar.gz: 361a11ba7ba9c81f572b773f0bc97afc0e8fea5d324c552963c06fd248d22b93fe69f54c87503910361656c86a11bb9ba05c9de69c76373c90570e9f202fa2b6
|
data/ChangeLog
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.2
|
data/algoliasearch-rails.gemspec
CHANGED
data/lib/algoliasearch-rails.rb
CHANGED
@@ -83,6 +83,7 @@ module AlgoliaSearch
|
|
83
83
|
|
84
84
|
# these are the class methods added when AlgoliaSearch is included
|
85
85
|
module ClassMethods
|
86
|
+
|
86
87
|
def algoliasearch(options = {}, &block)
|
87
88
|
@index_options = IndexOptions.new(block_given? ? Proc.new : nil)
|
88
89
|
attr_accessor :highlight_result
|
@@ -170,7 +171,13 @@ module AlgoliaSearch
|
|
170
171
|
def index_settings_changed?(prev, current)
|
171
172
|
return true if prev.nil?
|
172
173
|
current.each do |k, v|
|
173
|
-
|
174
|
+
prev_v = prev[k.to_s]
|
175
|
+
if v.is_a?(Array) and prev_v.is_a?(Array)
|
176
|
+
# compare array of strings, avoiding symbols VS strings comparison
|
177
|
+
return true if v.map { |x| x.to_s } != prev_v.map { |x| x.to_s }
|
178
|
+
else
|
179
|
+
return true if prev_v != v
|
180
|
+
end
|
174
181
|
end
|
175
182
|
false
|
176
183
|
end
|