lib/searchlogic/conditions/any_or_all.rb in searchlogic-1.5.6 vs lib/searchlogic/conditions/any_or_all.rb in searchlogic-1.5.7

- old
+ new

@@ -1,18 +1,18 @@ module Searchlogic module Conditions # = Any or All # - # Adds the ability to join all conditions wth "ANY" or "ALL". + # Adds the ability to join all conditions wth "AND" or "OR". module AnyOrAll # Determines if we should join the conditions with "AND" or "OR". # # === Examples # # search.conditions.any = true # will join all conditions with "or", you can also set this to "true", "1", or "yes" # search.conditions.any = false # will join all conditions with "and" def any=(value) - objects.each { |object| object.any = value } + (association_objects + group_objects).each { |object| object.any = value } @any = value end def any # :nodoc: any? \ No newline at end of file