Class: Plutonium::Query::Base
- Inherits:
-
Object
- Object
- Plutonium::Query::Base
- Defined in:
- lib/plutonium/query/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#apply(scope, **params) ⇒ Object
Applies a parameterized query to modify the given scope.
-
#humanize_value(value) ⇒ Object
Human-readable rendering of a single filter value for the active filter pill row.
Methods included from Definition::Presentable
Instance Method Details
#apply(scope, **params) ⇒ Object
Applies a parameterized query to modify the given scope.
24 25 26 |
# File 'lib/plutonium/query/base.rb', line 24 def apply(scope, **params) raise NotImplementedError, "#{self.class}#apply(scope, **params)" end |
#humanize_value(value) ⇒ Object
Human-readable rendering of a single filter value for the active filter pill row. Defaults to ‘value.to_s`. Subclasses (Filters::Association, Filters::Boolean) override to translate raw param values (SGIDs, “true”/“false”) into recognisable text.
32 33 34 |
# File 'lib/plutonium/query/base.rb', line 32 def humanize_value(value) value.to_s end |