filtering 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/filtering/base.rb +2 -2
- data/lib/filtering/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a507bc2561032ac497b5b4b5c7f83fbb8f545b1
|
4
|
+
data.tar.gz: 8ef5df369108a7fdbc82ee8b3e5916611bd55040
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f74fc8bcae8e7b94cee4428ad458d639641b487754d523fa714dbd08d3b2a445ea5673d22b103d96280c3542cee994f0198855ebea6b611c95f86c519b9e9cfd
|
7
|
+
data.tar.gz: 399a1d6b716513cdea90060564d3443f3e0b80c0dcf455397f8103b26535ead923ee47f0650db57f999cae9fdef1347373a8e618976f63a9bcb12fe6c722767a
|
data/README.md
CHANGED
@@ -25,8 +25,8 @@ All you need to do is inherit custom filter service from `Filtering::Base` and d
|
|
25
25
|
|
26
26
|
```
|
27
27
|
class Filters::UsersFilter < Filtering::Base
|
28
|
-
def initialize(params,
|
29
|
-
super(params,
|
28
|
+
def initialize(params, args)
|
29
|
+
super(params, args)
|
30
30
|
end
|
31
31
|
|
32
32
|
private
|
data/lib/filtering/base.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class Filtering::Base
|
2
2
|
def initialize(params, args = {})
|
3
|
-
@plain_params = params.permit(plain_acessible_params)
|
4
|
-
@complex_params = params.permit(complex_acessible_params)
|
3
|
+
@plain_params = params.permit(plain_acessible_params) unless plain_acessible_params.empty?
|
4
|
+
@complex_params = params.permit(complex_acessible_params) unless complex_acessible_params.empty?
|
5
5
|
@page = args[:page]
|
6
6
|
@results = relation
|
7
7
|
end
|
data/lib/filtering/version.rb
CHANGED