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 +4 -4
- data/lib/greedo/grid_helper.rb +2 -2
- data/lib/greedo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85e3b4b45fd6abafff2bd8fd246bf22a89db48ef
|
4
|
+
data.tar.gz: 21c126dc26173d50c5786b7ecbdc7ba697365db8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8629d496e23ce2133042b4886b45b6d2b5e2014afdda61e222e90ef4b94dab58ce0c7a4a530277d81765f229b282a426b14f0ccac4c51c1005dc97c0991bbcef
|
7
|
+
data.tar.gz: e5d207582bb52b3c5a5fdb0661acac3185e9ad90ffa26dcbf25557c63c34fedca969aa533e94e0d8041c33f2252a5e85d876d8db26d45acaa9dfc9e1d57e3129
|
data/lib/greedo/grid_helper.rb
CHANGED
@@ -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:
|
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,
|
data/lib/greedo/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|