You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ Scopes that accept no arguments are currently not supported.
79
79
80
80
#### Accessing Params with Filter Scopes
81
81
82
-
Filters with `type: :scope` have access to the params hash by passing in the desired keys to the `scope_params`. The keys passed in will be returned as a hash with their associated values, and should always appear as the last argument in your scope.
82
+
Filters with `type: :scope` have access to the params hash by passing in the desired keys to the `scope_params`. The keys passed in will be returned as a hash with their associated values.
83
83
84
84
```ruby
85
85
classPost < ActiveRecord::Base
@@ -130,6 +130,25 @@ The following types support ranges
130
130
- time
131
131
- datetime
132
132
133
+
### Mutating Filters
134
+
135
+
Filters can be mutated before the filter is applied using the `tap` argument. This is useful, for example, if you need to adjust the time zone of a `datetime` range filter.
0 commit comments