Module: Spree::Api::V3::Store::SearchProviderSupport

Extended by:
ActiveSupport::Concern
Included in:
Products::FiltersController, ProductsController
Defined in:
app/controllers/concerns/spree/api/v3/store/search_provider_support.rb

Constant Summary collapse

RANSACK_ID_PREDICATE_RE =

Matches *_id_in/id_eq/etc. and the bare id_in/id_eq on the resource's primary key. Mirrors the regex on ResourceController — duplicated here because FiltersController extends Store::BaseController, not ResourceController, and would otherwise NoMethodError on decode_prefixed_id_predicates. Requires a Ransack-predicate suffix so we don't match scope names like with_option_value_ids (which handle their own prefix decoding).

/(?:\A|_)id(?:s)?_(?:eq|not_eq|in|not_in|lt|lteq|gt|gteq)\z/.freeze