Module: Filterable::Concern
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/filterable/concern.rb
Overview
Declarative, whitelisted query filtering for ActiveRecord models.
Models opt in with include Filterable::Concern and register filters through
add_filter — a block, or any object responding to call(filters_params, scope).
The Filterable::Concerns::* mixins layer concrete filters and a declaration DSL
on top of this engine. filterable folds every registered filter over the
relation, each one narrowing it from the nested filters params.