-
Notifications
You must be signed in to change notification settings - Fork 80
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
Filter by has_one association field #96
Comments
@akrisanov Hey, thanks for the question! We have added support for this, but it hasn't made it's way to master yet. I'll work on adding it in early next week. |
@akrisanov will this help? |
@akrisanov @chevinbrown I have an open PR to add an example to the Readme as well. #97 |
@zberkom will ecto 3 change this? |
@chevinbrown I have yet to investigate how ecto 3 will effect things. It's on my list to do though :). In the meantime if you have any insight or ideas on how it might change things, I'm all ears. |
@chevinbrown @zberkom The code in #97 should still work with Ecto 3 🙂 |
I have two models – User and Credential. My admin UI shows a list of users and has some filters on the sidebar. It's pretty easy to add a filter for a model field, but I didn't find any examples in the documentation explaining filtration mechanism for associations. Is it possible to filter user records by
credential.email
without hackingdo_paginate_users/2
much?Maybe I need to extend
filter_config/1
and/orFiltrex.parse_params(filter_config(:users), params["user"] || %{})
?I'm facing almost the same problem when trying to order records.
The text was updated successfully, but these errors were encountered: