greedo 0.0.4 → 0.0.5
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 +1 -1
- data/lib/greedo/paginator.rb +2 -3
- data/lib/greedo/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: 8f68dee2429a340ebd06a0499df197e8fc2b4c79
|
4
|
+
data.tar.gz: 5b58bd4694eb4c09327f710f734a623b29de3044
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77cb491c02725cf064cc72e9f9a75c1fcbb039efc385e8cdf4ddaae86e49330ace055308f9a77430a66159920835c8141a6d8d32fea86c7c5656fba2532d3322
|
7
|
+
data.tar.gz: b2cb29ad19bd312a26585feff6eee609e7a8d4876cee38a3802223452f82a83c0ffe2d631a940e876112f9cdf2cfac014b42d6a31f9a56ec6cce7407cb6dd482
|
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: 20,
|
161
|
+
per_page: params.fetch(:per_page) { 20 }.to_i,
|
162
162
|
path_params: {},
|
163
163
|
order: params[:order],
|
164
164
|
order_by: params[:order_by],
|
data/lib/greedo/paginator.rb
CHANGED
@@ -6,9 +6,8 @@ module Greedo
|
|
6
6
|
attr_reader :scope, :page, :per_page, :order, :order_by
|
7
7
|
|
8
8
|
def self.build(scope,
|
9
|
-
|
10
|
-
|
11
|
-
per_page: params.fetch(:per_page) { 20 }.to_i,
|
9
|
+
page: 1,
|
10
|
+
per_page: 20,
|
12
11
|
order_by: nil)
|
13
12
|
return ArrayPaginator.new(scope, order_by.order, order_by.sort) if scope.is_a?(Array)
|
14
13
|
Paginator.new(scope, page: page, per_page: per_page,
|
data/lib/greedo/version.rb
CHANGED