-
Notifications
You must be signed in to change notification settings - Fork 41
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
Support queries yielding heterogeneous results #108
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a glance this looks pretty good. May also want to consider writing integration tests for this.
Was out last week - but will pick this back up this week and add integ tests. |
Have had to prioritize other work - but returning to this now. I will merge this tomorrow unless there are any other comments. |
Issue: #107
Description of changes:
Add
#multi_model_filter
toBuildableSearch
which takes either a passed Proc/lambda or a block. Given the raw item data thatmodel_filter
returns the class (or nil to skip) to use for that item.Example Usage
Of note:
complete!
on the query which is a little strange. But allows you to pass a lambda/proc was a parameter tomulti_model_filter
and use it just like any other builder function. (One alternative is to call complete! when a block is passed, but treat a passed parameter as a builder function).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.