Closed arlharis closed 4 years ago
Hi, I'm stuck with this problem for almost a whole day now. My datatable is working properly then I decided to use custom columns.
the result is not appear when I type 'Paid' or 'Pending' at the search bar. But if I type true or false, the result appear.
I also tried the example that uses Arel syntax but still same error. Please advise. Im using rails 6
purchase_datatable.rb
def view_columns @view_columns ||= { . . . paid: { source: 'Purchase.paid', cond: change_data }, . . . } end def data records.map do |record| { . . . paid: record.paid ? 'Paid' : 'Pending' , ## The data is in boolean . . . } end end def change_data ->(column, value) { column.table[column.field].eq(column.search.value.to_s + '') } end
Hi, I'm stuck with this problem for almost a whole day now. My datatable is working properly then I decided to use custom columns.
the result is not appear when I type 'Paid' or 'Pending' at the search bar. But if I type true or false, the result appear.
I also tried the example that uses Arel syntax but still same error. Please advise. Im using rails 6
purchase_datatable.rb