jbox-web / ajax-datatables-rails

A wrapper around DataTable's ajax methods that allow synchronization with server-side pagination in a Rails app
MIT License
587 stars 228 forks source link

Sorting encrypted data #393

Closed PHRAIN22 closed 2 years ago

PHRAIN22 commented 3 years ago

I am using the gem Lockbox to encrypt my data.

It displaying the data works fine.

Sorting the data seems to be an issue since it sorts with the encrypted hash value instead of the decrypted one.

Sorting with "ServerSide": false make it possible to sort my columns correctly but it only shows 10 results. With ServerSide enabled, it retrieves all the data + results but the sorting won't work as expected.

Any ideas what the issue could be?

n-rodriguez commented 2 years ago

Any ideas what the issue could be?

you simply cannot sort encrypted columns in server side mode because data are.. encrypted :)

it works if you set ServerSide: false because in this mode sort is done in the browser but you're not using this gem any more :)