Skip to content

Commit a19a9db

Browse files
committed
Merge pull request jbox-web#22 from e-fisher/nil_value_listing
Fixed where clause being built when search is empty string
2 parents bcc74a7 + 19d8a71 commit a19a9db

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)