Skip to content

Commit 1fc13d0

Browse files
committed
update bundle
1 parent ab260fc commit 1fc13d0

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
searchlogic (2.5.15)
4+
searchlogic (2.5.17)
55
activerecord (~> 2.3.12)
66
activesupport (~> 2.3.12)
77

@@ -16,11 +16,11 @@ GEM
1616
rake
1717
coderay (1.1.0)
1818
method_source (0.8.2)
19-
pry (0.9.12.4)
19+
pry (0.9.12.6)
2020
coderay (~> 1.0)
2121
method_source (~> 0.8)
2222
slop (~> 3.4)
23-
rake (10.1.0)
23+
rake (10.1.1)
2424
rspec (1.3.2)
2525
slop (3.4.7)
2626
sqlite3 (1.3.8)

lib/searchlogic/search/method_missing.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def cast_type(name)
8989
def type_cast(value, type, options = {})
9090
case value
9191
when Array
92-
value.collect { |v| type_cast(v, type) }
92+
value.collect { |v| type_cast(v, type) }.uniq
9393
when Range
9494
Range.new(type_cast(value.first, type), type_cast(value.last, type))
9595
else

lib/searchlogic/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Searchlogic
2-
VERSION = "2.5.16"
2+
VERSION = "2.5.17"
33
end

spec/searchlogic/search_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@
100100
search.conditions = {"id_equals_any" => ["", "1"]}
101101
search.id_equals_any.should == [1]
102102
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
103109
end
104110

105111
context "#compact_conditions" do

0 commit comments

Comments
 (0)