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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d10e915ebf65faf4e5bde4d5757bf482638c2c6
4
- data.tar.gz: c1aae098a832689f11562c4a04a760cc67ad702f
3
+ metadata.gz: 9a507bc2561032ac497b5b4b5c7f83fbb8f545b1
4
+ data.tar.gz: 8ef5df369108a7fdbc82ee8b3e5916611bd55040
5
5
  SHA512:
6
- metadata.gz: 747eaed5311cc56b010dca7b3b40b9bdd9b84deea49df1d07a5e132730d05638d6efaf67aca14500e6d680185b15e58426aca607394e5647bf20cc8b372ddf92
7
- data.tar.gz: 5ad728b74ae091db15c3432cb5168e01d8adc1b71b9594eec68db9ac707e3e90639f852eb46d81f5e57ff836e0d6c3ab22e887c9533b642f355d72062a915a46
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, page)
29
- super(params, page)
28
+ def initialize(params, args)
29
+ super(params, args)
30
30
  end
31
31
 
32
32
  private
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Filtering
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filtering
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaliy