searchlogic 2.5.16 → 2.5.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/lib/searchlogic/search/method_missing.rb +1 -1
- data/lib/searchlogic/version.rb +1 -1
- data/spec/searchlogic/search_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDZlNzA2MzVhZWM3NzJkMmI5ZTUzM2EwZWFiYWMzOGIwNDU3ZTAyMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Njc5NzZmYmQzN2FlNzQwYTg1MzBjMmRiNTRlN2NhNzViZjVkYTA5MA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTVkNjJkMWQ5MjVmMDZlOGMwMGY1MjEzNDY0YWM3OGUzNGIyODNmZDliNGRj
|
10
|
+
OWJlMmJlMjYzNmM5NDgzYTg3MjA3N2I5MDhlZDZlMzA0N2JjYjEzOGNlNzg1
|
11
|
+
NWE4NjgzOWYzZjZmMWY0NzFlOTM5OTZjYTVmZjY0ODA1NzVhNzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWZiYWM5MTQ5ZDhlZTg2ZjQ4MzE0NzhmNmE2NmYyYjlkMGU4YTk1YjkzMjMw
|
14
|
+
YjlkZmY2ZjVkMjBkMDVkNmQ1NDgxM2EwY2Y3NmZiOWI3ZjFjZWQwMjMyZDVj
|
15
|
+
Y2UwMTZhNGUyMGU0MWQxOGY4NjVhZGYxZTM2OTIxZDg0NjJhN2M=
|
data/Gemfile.lock
CHANGED
@@ -89,7 +89,7 @@ module Searchlogic
|
|
89
89
|
def type_cast(value, type, options = {})
|
90
90
|
case value
|
91
91
|
when Array
|
92
|
-
value.collect { |v| type_cast(v, type) }
|
92
|
+
value.collect { |v| type_cast(v, type) }.uniq
|
93
93
|
when Range
|
94
94
|
Range.new(type_cast(value.first, type), type_cast(value.last, type))
|
95
95
|
else
|
data/lib/searchlogic/version.rb
CHANGED
@@ -100,6 +100,12 @@ describe Searchlogic::Search do
|
|
100
100
|
search.conditions = {"id_equals_any" => ["", "1"]}
|
101
101
|
search.id_equals_any.should == [1]
|
102
102
|
end
|
103
|
+
|
104
|
+
it "should remove duplicate values in arrays" do
|
105
|
+
search = User.search
|
106
|
+
search.conditions = {"username_equals_any" => ["dup", "dup"]}
|
107
|
+
search.username_equals_any.should == ["dup"]
|
108
|
+
end
|
103
109
|
end
|
104
110
|
|
105
111
|
context "#compact_conditions" do
|