8000 Fixed where clause being built when search is empty string, which cau… · FiveBox/ajax-datatables-rails@19d8a71 · GitHub
[go: up one dir, main page]

Skip to content

Commit 19d8a71

Browse files
committed
Fixed where clause being built when search is empty string, which caused records with nil values to be excluded
1 parent bcc74a7 commit 19d8a71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ajax-datatables-rails/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def search_condition(column, value)
9999
def aggregate_query
100100
conditions = searchable_columns.each_with_index.map do |column, index|
101101
value = params["sSearch_#{index}".to_sym]
102-
search_condition(column, value) if value
102+
search_condition(column, value) unless value.blank?
103103
end
104104
conditions.compact.reduce(:and)
105105
end

0 commit comments

Comments
 (0)
0