Skip to content
Browse files

Implement chlu changes, pulling commit had a conflict

  • Loading branch information...
1 parent 5eb5387 commit c24e942ce425df88a90587969cd9f9659f6390e5 @binarylogic committed Jan 14, 2010
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/searchlogic/search.rb
View
12 lib/searchlogic/search.rb
@@ -84,7 +84,11 @@ def method_missing(name, *args, &block)
if setter?(name)
if scope?(scope_name)
- conditions[condition_name] = type_cast(args.first, cast_type(scope_name))
+ if args.size == 1
+ conditions[condition_name] = type_cast(args.first, cast_type(scope_name))
+ else
+ conditions[condition_name] = args
+ end
else
raise UnknownConditionError.new(condition_name)
end
@@ -109,11 +113,7 @@ def method_missing(name, *args, &block)
scope
end
else
- if value.is_a?(Array)
- scope.send(scope_name, *value)
- else
- scope.send(scope_name, value)
- end
+ scope.send(scope_name, *value)
end
end
scope.send(name, *args, &block)

0 comments on commit c24e942

Please sign in to comment.
Something went wrong with that request. Please try again.