lib/ajax-datatables-rails/datatable/column/search.rb
def regex_search
          if use_regex?
            ::Arel::Nodes::Regexp.new((custom_field? ? field : table[field]), ::Arel::Nodes.build_quoted(formatted_value))
          else
            non_regex_search
          end
        end
# Using multi-select filters in JQuery Datatable auto-enables regex_search.
# Unfortunately regex_search doesn't work when filtering on primary keys with integer.
# It generates this kind of query : AND ("regions"."id" ~ '2|3') which throws an error :
# operator doesn't exist : integer ~ unknown
# The solution is to bypass regex_search and use non_regex_search with :in operator
Using multi-select filters in JQuery Datatable auto-enables regex_search.
Unfortunately regex_search doesn't work when filtering on primary keys with integer.
It generates this kind of query : AND ("regions"."id" ~ '2|3') which throws an error :
operator doesn't exist : integer ~ unknown
The solution is to bypass regex_search and use non_regex_search with :in operator
Using multi - select filters in JQuery Datatable auto - enables regex_search . Unfortunately regex_search doesn ' t work when filtering on primary keys with integer . It generates this kind of query : AND ( " regions " . " id " ~ ' 2|3 ' ) which throws an error : operator doesn ' t exist : integer ~ unknown The solution is to bypass regex_search and use non_regex_search with : in operator
def regex_search
          if use_regex?
            ::Arel::Nodes::Regexp.new((custom_field? ? field : table[field]), ::Arel::Nodes.build_quoted(formatted_value))
          else
            non_regex_search
          end
        end
def regex_search if use_regex? :: Arel :: Nodes :: Regexp . new ( ( custom_field? ? field : table [ field ] ) , :: Arel :: Nodes . build_quoted ( formatted_value ) ) else non_regex_search end end
Using multi-select filters in JQuery Datatable auto-enables regex_search.
Using multi - select filters in JQuery Datatable auto - enables regex_search .