NAME
Jifty::Action::Record::Search
DESCRIPTION
The class is a base class for Jifty::Actions that serve to provide an interface to general searches through Jifty::Record objects. To use it, subclass it and override the record_class
method to return the fully qualified name of the model to do searches over.
METHODS
arguments
Remove validators from arguments, as well as ``mandatory'' restrictions. Remove any arguments that render as password fields, or refer to collections.
Generate additional search arguments for each field based on the following criteria:
text
orvarchar
fields-
Create
field
_contains andfield
_lacks arguments date
, ortimestamp
fields-
Create
field
_before andfield
_after arguments - integer fields
-
Generate
field
_lt andfield
_gt arguments
take_action
Return a collection with the result of the search specified by the given arguments.
We interpret a undef
argument as SQL NULL
, and ignore empty or non-present arguments.