Method: Scrivito::BasicObj.where
- Defined in:
- app/cms/scrivito/basic_obj.rb
.where(field, operator, value, boost = nil) ⇒ Scrivito::ObjSearchEnumerator
Note:
If invoked on a subclass of Obj, the result will be restricted to instances of this
Returns an ObjSearchEnumerator with the given initial subquery consisting of the four arguments.
Note that field
and value
can also be arrays for searching several fields or searching for several values.
subclass.
ObjSearchEnumerators can be chained using one of the chainable methods (e.g. ObjSearchEnumerator#and and ObjSearchEnumerator#and_not).
270 271 272 273 274 275 276 277 278 |
# File 'app/cms/scrivito/basic_obj.rb', line 270 def self.where(field, operator, value, boost = nil) assert_not_basic_obj('.where') if type_computer.special_class?(self) Workspace.current.objs.where(field, operator, value, boost) else Workspace.current.objs.where(:_obj_class, :equals, name) .and(field, operator, value, boost) end end |