-
Notifications
You must be signed in to change notification settings - Fork 74
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
Filters - Support OR filter type with conditions on belongsTo/hasOne fields #321
Conversation
…/hasOne associations.
3c744ed
to
f3512d9
Compare
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.
if @params[:filter] | ||
operator = " #{@params[:filterType]} ".upcase |
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.
[Unused Variable] - Defined but never used (doesn't seems to be needed)
@params[:filter].each do |field, values| | ||
next unless belongs_to_association?(field) | ||
|
||
values.split(',').each do |value| | ||
@records = belongs_to_subfield_filter(field, value) | ||
conditions << OperatorValueParser.get_has_one_condition(@resource, field, value, @params[:timezone]) |
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.
[Linter] - Bad indentation
Add little code to handle 'or' filter type when performing the search.
https://trello.com/c/Yv2J5C8k/3478-filters-support-or-filter-type-with-conditions-on-belongsto-hasone-fields