Closed maurymmarques closed 9 years ago
unfortunately this is not possible, but there is a simple workaround which I implemented multiple times: I create one more column name
and it gets populated in before_save
All right. I do not think it's the best solution though. I also thought that maybe it was possible to do something that would work in the controller side.
Something like:
@users_grid = initialize_grid(
User.where('first_name LIKE ? OR last_name LIKE ?', "%#{params[:grid][:f][:first_name]}%", "%#{params[:grid][:f][:last_name]}%")
)
But itsn't working yet.
Thank you.
hm.. the first argument can be an ActiveRelation, so theoretically this should work
I will keep trying, if I get it I will write it here. Another question... Is there a way to change the date format for the datepicker? http://awesomescreenshot.com/0854ytv050 I would like to define something like "09/06/2015" Thank you very much, Yuri.
Oh, I got it, It's a constant 'DATE_FORMAT_JQUERY'. I'm sorry.
right, was just about to post this link https://github.com/leikind/wice_grid/blob/rails3/lib/generators/wice_grid/templates/wice_grid_config.rb#L133
My project has 2 columns for the table users, "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:
I want to do something like that (or maybe something simpler):
Is that possible?
If yes, what should I do to be able to custom the filters like that?
Thank you.