Closed reiallenramos closed 6 years ago
I'm not sure which part I should modify..
def filter_full_name_condition
->(column, value) { column.table[column.field].eq(column.search.value.to_i + 1) }
end
Ah you're a lifesaver! Thank you so much :)
You're welcome!
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. I found this project and used it as reference but I can't get it to work properly.
For context, my User model has the attributes
first_name
andlast_name
, but I need to be able to search viafull_name
which is a model method that simply returns a string.I'm getting this error when I type anything in the search box
I found a discussion that says
filter
method receives 2 params now but when I checked the master branch,filter
method is no longer in column.rb. Although I'm not entirely sure if the error is in thefilter
method, I tried using the specific commit that changed this method by specifying it when I load the gem in the Gemfile but I get the same error.I also tried the example that uses Arel syntax but still same error. Please advise.
users_datatable.rb
user.js
Gemfile.lock