My project has 2 columns for the table user, "first_name"" and "last_name" and I want to show them in just 1 column and with 1 field to filter it (Full Name). I have something like that:
g.column name: 'First Name', attribute: 'first_name' do |user|
user.first_name
end
g.column name: 'Last Name', attribute: 'last_name' do |user|
user.last_name
end
I want to do something like that:
g.column name: 'Full Name', filter: proc{ |q| where("first_name LIKE :query OR last_name LIKE :query", query: "%#{q}%") } do |user|
user.first_name + ' ' + user.first_name
end
Is that possible?
If yes, what should I do to be able to custom the filters like that?
Thank you.
I think that isn't possible yet.
The createor of WiceGrid said:
Check all comments here:
https://github.com/leikind/wice_grid/issues/225