Possibility to change operator from AND to OR
Closed this issue · 2 comments
mrudult commented
I have got a table where the filters need be joined by OR instead of AND
Is there a way we can change this to accept :or?
n-rodriguez commented
Is there a way we can change this to accept
:or?
Yes, just override the existing method :
class MyDatatable < AjaxDatatablesRails::ActiveRecord
def build_conditions_for_selected_columns
search_columns.map(&:search_query).compact.reduce(:or)
end
endmrudult commented
@n-rodriguez Thanks. It worked.