Skip to content
Browse files

Release v1.6.3

  • Loading branch information...
1 parent 3ee7496 commit c0e02bbca3025df939405866024476e06203a720 @binarylogic binarylogic committed Feb 2, 2009
Showing with 9 additions and 2 deletions.
  1. +1 −1 lib/searchlogic/conditions/base.rb
  2. +1 −1 lib/searchlogic/version.rb
  3. +7 −0 test/conditions_tests/base_test.rb
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

0 comments on commit c0e02bb

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