filta 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/VERSION +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1a6772016c764a05327275e6ccd107cd24b98174f3085067924be26c5e40e86
|
4
|
+
data.tar.gz: e180b371052936d4e4109f24c07e3f28aacc4c6dfcb61065624cbd8f0b118db1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20aeaa3976e28924deeec88fc5f3ac692f2fb0369c84d4d42b2006bf4dd0ea62b75462a2193905cac0bd657513dc31336609bd9a06fa2168674f6ce7c3f03ee5
|
7
|
+
data.tar.gz: a19652f91dc4858ba35486b894a639485d3bf0df941125c8572a80e3ced84242e75fe3299275f7c7da156daed73d0729586415ded6675e9fb1f5f104cca6b5f3
|
data/README.md
CHANGED
@@ -34,16 +34,17 @@ $ gem install filta
|
|
34
34
|
Use like you would any other kind of ActiveRecord scope.
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
@filtered = Klass.filta(
|
37
|
+
@filtered = Klass.filta(title: "Foo", something: "Bar")
|
38
|
+
@filtered = Klass.filta({ title: "Foo", something: "Bar" }) # Can also use with hash
|
38
39
|
```
|
39
40
|
|
40
41
|
The `filta` method returns an ActiveRecord relation so you can chain the calls with other methods.
|
41
42
|
|
42
43
|
```ruby
|
43
|
-
Klass.filta(
|
44
|
+
Klass.filta(title: "Foo").order("created_at DESC")
|
44
45
|
```
|
45
46
|
|
46
|
-
If using in a controller make sure you use the `params.permit` method to sanitize what you pass into the `
|
47
|
+
If using in a controller make sure you use the `params.permit` method to sanitize what you pass into the `filta` method.
|
47
48
|
|
48
49
|
## Contributing
|
49
50
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.1
|