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
590 stars 227 forks source link

Columns mapping: equals condition for string filter. #291

Closed fate83 closed 6 years ago

fate83 commented 6 years ago

Hi!

I would like to apply a filter condition that filters a string for equality. Since you state in your README that there is no string equivalent for :eq condition value, we (ab)use numeric :eq for that and it worked fine since SQL can handle string comparison quite well.

With the 0.4.2 release you included Fix integer out of range #284 PR. This prevents abusing numeric :eq for :string_eq filter.

My Question(s): Will there be a string equals filter in the future or are we required to create a custom filters (Proc) for that functionality?

Or am I doing something completely wrong here?

n-rodriguez commented 6 years ago

Or am I doing something completely wrong here?

No, you're completely right :) Got the same issue here on some fields... I think I should have more tests ^^