diff --git a/lib/ransack/helpers/form_builder.rb b/lib/ransack/helpers/form_builder.rb index c13c6be..a4c1d11 100644 --- a/lib/ransack/helpers/form_builder.rb +++ b/lib/ransack/helpers/form_builder.rb @@ -127,8 +127,12 @@ module Ransack options[:compounds] = true if options[:compounds].nil? default = options.delete(:default) || 'cont'.freeze - keys = options[:compounds] ? Predicate.names : + keys = + if options[:compounds] + Predicate.names + else Predicate.names.reject { |k| k.match(/_(any|all)$/) } + end if only = options[:only] if only.respond_to? :call keys = keys.select { |k| only.call(k) }