greedo 0.0.5 → 0.0.6

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: 8f68dee2429a340ebd06a0499df197e8fc2b4c79
4
- data.tar.gz: 5b58bd4694eb4c09327f710f734a623b29de3044
3
+ metadata.gz: 85e3b4b45fd6abafff2bd8fd246bf22a89db48ef
4
+ data.tar.gz: 21c126dc26173d50c5786b7ecbdc7ba697365db8
5
5
  SHA512:
6
- metadata.gz: 77cb491c02725cf064cc72e9f9a75c1fcbb039efc385e8cdf4ddaae86e49330ace055308f9a77430a66159920835c8141a6d8d32fea86c7c5656fba2532d3322
7
- data.tar.gz: b2cb29ad19bd312a26585feff6eee609e7a8d4876cee38a3802223452f82a83c0ffe2d631a940e876112f9cdf2cfac014b42d6a31f9a56ec6cce7407cb6dd482
6
+ metadata.gz: 8629d496e23ce2133042b4886b45b6d2b5e2014afdda61e222e90ef4b94dab58ce0c7a4a530277d81765f229b282a426b14f0ccac4c51c1005dc97c0991bbcef
7
+ data.tar.gz: e5d207582bb52b3c5a5fdb0661acac3185e9ad90ffa26dcbf25557c63c34fedca969aa533e94e0d8041c33f2252a5e85d876d8db26d45acaa9dfc9e1d57e3129
@@ -158,7 +158,7 @@ module Greedo
158
158
  def greedo(scope,
159
159
  param_name: :page,
160
160
  page: params.fetch(param_name) { 1 }.to_i,
161
- per_page: params.fetch(:per_page) { 20 }.to_i,
161
+ per_page: nil,
162
162
  path_params: {},
163
163
  order: params[:order],
164
164
  order_by: params[:order_by],
@@ -170,7 +170,7 @@ module Greedo
170
170
  grid.configure(&block)
171
171
  grid.paginator = Paginator.build(scope,
172
172
  page: page,
173
- per_page: per_page,
173
+ per_page: (params[:per_page] || per_page || 20).to_i,
174
174
  order_by: grid.ordered_by)
175
175
  render partial: "greedo/grid", locals: {grid: grid,
176
176
  param_name: param_name,
@@ -1,3 +1,3 @@
1
1
  module Greedo
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greedo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Pohorecki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-20 00:00:00.000000000 Z
11
+ date: 2018-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler