Skip to content

Add reject filter#1573

Closed
andershagbard wants to merge 29 commits intoShopify:mainfrom
andershagbard:filter-reject
Closed

Add reject filter#1573
andershagbard wants to merge 29 commits intoShopify:mainfrom
andershagbard:filter-reject

Conversation

@andershagbard
Copy link
Contributor

This filter adds the inverse of the where filter.

This filter also allows deep searching with dot notation.

Idea from: #1555

@andershagbard

This comment was marked as resolved.

@bakura10
Copy link

I’m not a ruby developer but it seems you also added a nice feature on the reject filter allowing to filter nested objects. This should most likely be backported to the where filter as well.

@andershagbard
Copy link
Contributor Author

I’m not a ruby developer but it seems you also added a nice feature on the reject filter allowing to filter nested objects. This should most likely be backported to the where filter as well.

That has proven a bit harder, as there is some backward compatibility we need to take care of: #1436

karreiro pushed a commit that referenced this pull request Dec 3, 2024
karreiro added a commit that referenced this pull request Jan 14, 2025
* Add reject filter #1573

* Add deep search for filter taking in properties #1749

* Update branch with main

* Add `find`, `find_index`, `has`, and `reject` filters to arrays

* Refactor: avoid usage of public_send

---------

Co-authored-by: Anders Søgaard <andershagbard@gmail.com>
Co-authored-by: Anders Søgaard <9662430+andershagbard@users.noreply.github.com>
@andershagbard
Copy link
Contributor Author

Solved in #1869

@andershagbard andershagbard deleted the filter-reject branch February 14, 2025 08:49
andrykonchin pushed a commit to andrykonchin/liquid that referenced this pull request Feb 24, 2025
…ify#1869)

* Add reject filter Shopify#1573

* Add deep search for filter taking in properties Shopify#1749

* Update branch with main

* Add `find`, `find_index`, `has`, and `reject` filters to arrays

* Refactor: avoid usage of public_send

---------

Co-authored-by: Anders Søgaard <andershagbard@gmail.com>
Co-authored-by: Anders Søgaard <9662430+andershagbard@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants