-
-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Searching for full name #490
Comments
Thanks. |
Lets see: I'm pretty sure this is more of an Api Arel change then something that has to do with ransack itself (maybe I better post my question in Arel issue tracker). Anyway the Regards, |
And solved my own question, apparently I was pretty close, Arel now requires you to quote the string so ransacker :full_name do |parent|
Arel::Nodes::InfixOperation.new('||',
Arel::Nodes::InfixOperation.new('||',
parent.table[:firstname], Arel::Nodes.build_quoted(' ')
),
parent.table[:lastname]
)
end Is the new way to do a full name search -- notice the |
Thanks for the info! 💚 Will update the wiki example. |
Wiki updated. |
I ran into a similar issue on the version that uses the ws_concat (the last one in the example). Here is the working version if you want to update the wiki: ransacker :full_name, formatter: proc { |v| v.mb_chars.downcase.to_s } do |parent| |
hello,
After upgrading to Arel 6 the following full name search method does not work anymore
The following error is triggered:
Arel is a bit out of my league, I tried some stuff but since there is virtually no documentation I'm kinda in the dark. Thanks!
The text was updated successfully, but these errors were encountered: