How can I hide a column in a jQuery datatables bas

2019-09-07 06:34发布

问题:

I have a jQuery datatables implemented and it's working just fine. However, based on a user role, I would like to hide a column. To fix this, in Rails, I can set the conditional within a view/template. But that doesn't' work because on each request I get an alert telling me about for how many rows data is missing to be pulled into. Any ideas as to how to fix this? Much appreciated.
Alek