searchlogic 2.3.8 → 2.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +1 -1
- data/lib/searchlogic/search.rb +5 -1
- data/searchlogic.gemspec +2 -2
- data/spec/search_spec.rb +8 -0
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/searchlogic/search.rb
CHANGED
@@ -109,7 +109,11 @@ module Searchlogic
|
|
109
109
|
scope
|
110
110
|
end
|
111
111
|
else
|
112
|
-
|
112
|
+
if value.is_a?(Array)
|
113
|
+
scope.send(scope_name, *value)
|
114
|
+
else
|
115
|
+
scope.send(scope_name, value)
|
116
|
+
end
|
113
117
|
end
|
114
118
|
end
|
115
119
|
scope.send(name, *args, &block)
|
data/searchlogic.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{searchlogic}
|
8
|
-
s.version = "2.3.
|
8
|
+
s.version = "2.3.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ben Johnson of Binary Logic"]
|
12
|
-
s.date = %q{2009-11-
|
12
|
+
s.date = %q{2009-11-27}
|
13
13
|
s.description = %q{Searchlogic makes using ActiveRecord named scopes easier and less repetitive.}
|
14
14
|
s.email = %q{bjohnson@binarylogic.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/search_spec.rb
CHANGED
@@ -339,6 +339,14 @@ describe "Search" do
|
|
339
339
|
it "should recognize the order condition" do
|
340
340
|
User.search(:order => "ascend_by_username").proxy_options.should == User.ascend_by_username.proxy_options
|
341
341
|
end
|
342
|
+
|
343
|
+
it "should pass array values as multiple arguments" do
|
344
|
+
User.named_scope(:multiple_args, lambda { |*args|
|
345
|
+
raise "This should not be an array, it should be 1" if args.first.is_a?(Array)
|
346
|
+
{:conditions => ["id IN (?)", args]}
|
347
|
+
})
|
348
|
+
User.search(:multiple_args => [1,2]).proxy_options.should == User.multiple_args(1,2).proxy_options
|
349
|
+
end
|
342
350
|
end
|
343
351
|
|
344
352
|
context "method delegation" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: searchlogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Johnson of Binary Logic
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-27 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|