Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Release v1.6.3

  • Loading branch information...
commit c0e02bbca3025df939405866024476e06203a720 1 parent 3ee7496
@binarylogic authored
View
2  lib/searchlogic/conditions/base.rb
@@ -227,7 +227,7 @@ def join_object_with_any?(object)
if condition?(object) || group?(object)
object.explicit_any?
elsif association?(object)
- join_object_with_any?(object.send(:objects).first)
+ object.send(:join_object_with_any?, object.send(:objects).first)
end
end
View
2  lib/searchlogic/version.rb
@@ -67,7 +67,7 @@ def to_a
MAJOR = 1
MINOR = 6
- TINY = 2
+ TINY = 3
# The current version as a Version instance
CURRENT = new(MAJOR, MINOR, TINY)
View
7 test/conditions_tests/base_test.rb
@@ -174,5 +174,12 @@ def test_reset
conditions.reset!
assert_equal [], conditions.send(:objects)
end
+
+ def test_join_with_or_with_association
+ conditions = Searchlogic::Cache::AccountConditions.new
+ conditions.name_ends_with = "Binary"
+ conditions.users.or_first_name_like = "whatever"
+ assert_equal ["\"accounts\".\"name\" LIKE ? OR \"users\".\"first_name\" LIKE ?", "%Binary", "%whatever%"], conditions.sanitize
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.