rao-resources_controller 0.0.21.pre → 0.0.22.pre

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
  SHA256:
3
- metadata.gz: 4fff12e71b5abd4c04de6759e3ca9d0ce5784ae2388b57729ffa1a4c356f075c
4
- data.tar.gz: d0a06e05b176b0f90ad9ed86fdf0532c7d48ad1e40e4622659bf3ac93b66ecac
3
+ metadata.gz: 809a6b4b2493009c0e2cf5d3a120c6bd4e1afd8f2139af0e61f44125d57cf28a
4
+ data.tar.gz: 80504d7afed80dde55addda08776731a2e55293f4991c246ec9e28aa3290d901
5
5
  SHA512:
6
- metadata.gz: 16995d2c6e3fda2857fbd91952121bde6cf9a1a41da5216df92935a3e93a8baebdd69b335f47d7358b1fcf6d04f66046263e992bb0fb63209706a680df41eb9f
7
- data.tar.gz: 5d6a6dfc118a14b62e040d16d3767d72480fe01cda552cc68964399af26a915a186e085622745e17fbd4200ed4157fc34914ba5a6b8c333cda8178cfe9e84814
6
+ metadata.gz: 2a4c5a31b95c384ce4e9205c382e939a7f71b82117bb7c8ae567de1244defafa4323f94b8db54f486b51c28f8e2d2916f8532387ab6480ebae55fef4d7fa8511
7
+ data.tar.gz: 736a7c62941b1da53def3c5e749c711ebf046a625d6d1fe6eab322c452f9630952b8e7f53164a9ddaae3a219efd39c024d2d6393377da786711a513f840dcec0
@@ -18,7 +18,7 @@ module Rao
18
18
 
19
19
  def per_page
20
20
  if [nil, 'all'].include?(params[:per_page])
21
- nil
21
+ load_collection_scope.count
22
22
  else
23
23
  Rao::ResourcesController::Configuration.pagination_per_page_default
24
24
  end
@@ -14,13 +14,13 @@ module Rao
14
14
 
15
15
  def load_collection
16
16
  options = { page: params[:page] }
17
- options[:per_page] = per_page unless per_page.nil?
17
+ options[:per_page] = per_page
18
18
  @collection = load_collection_scope.paginate(options)
19
19
  end
20
20
 
21
21
  def per_page
22
22
  if [nil, 'all'].include?(params[:per_page])
23
- nil
23
+ load_collection_scope.count
24
24
  else
25
25
  Rao::ResourcesController::Configuration.pagination_per_page_default
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rao-resources_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21.pre
4
+ version: 0.0.22.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-30 00:00:00.000000000 Z
11
+ date: 2019-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails