Module: Filterable::Matchable

Defined in:
lib/filterable/matchable.rb,
lib/filterable/matchable/contains.rb,
lib/filterable/matchable/ends_with.rb,
lib/filterable/matchable/starts_with.rb

Overview

Namespace for the partial match filters and the helpers they share. The user's term is always LIKE-escaped (+%+ and _ match literally) and the wildcard placement is fixed by the declarative key — the caller never controls the pattern. Matching is case insensitive by default; a declaration may opt into sensitivity with case_sensitive: true, and the request may override either way with the reserved filters[<attribute>][case_sensitive] key (strict true or bare key switches on, explicit false switches off, anything else falls back to the declaration).

Defined Under Namespace

Modules: Contains, EndsWith, StartsWith

Constant Summary collapse

ESCAPE =

The LIKE escape character, matching what sanitize_sql_like emits.

'\\'