🕵️‍♀️ Task
where is used for filtering a collection of records down using various criteria. Most commonly, we pass a Hash argument. The key is the column you’re searching in and the value is what you’re trying to find in that column. The value could be any type of object, but the Class should usually match the type of column you’re searching in.
Returns a new relation, which is the result of filtering the current relation according to the conditions in the arguments.
whereaccepts conditions in one of several formats.
Given a
Hashargument, the keys are columns and the values are values to be searched for. Columns can be symbols or strings. Values can be single values, arrays, or ranges.