Skip to content
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

Add the ability to combine aliases #847

Open
dkniffin opened this issue Nov 29, 2017 · 1 comment
Open

Add the ability to combine aliases #847

dkniffin opened this issue Nov 29, 2017 · 1 comment
Labels
tests wanted We would love to see some tests added on a PR to demonstrate this issue

Comments

@dkniffin
Copy link

#623 added ransack aliases, so long query strings like owner_first_name_or_owner_last_name can be shortened to owner. This feature is great, but it'd be even better if we could combine those aliases with _or_ like any other query string.

Example:

class Post < ApplicationRecord
  ransack_alias :owner, :owner_first_name_or_owner_last_name
  ransack_alias :approver, :approver_first_name_or_approver_last_name
end

Post.ransack(owner_or_approver_cont: "Bob")
@scarroll32
Copy link
Member

Thank you @dkniffin. Any chance of writing a test against this feature? Just submit a PR with the tests only and refer this issue. It will help someone code it. Cheers.

@scarroll32 scarroll32 added the tests wanted We would love to see some tests added on a PR to demonstrate this issue label Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests wanted We would love to see some tests added on a PR to demonstrate this issue
Projects
None yet
Development

No branches or pull requests

2 participants