corn_starch 1.1.25 → 1.1.26
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a71cdc5daad01306535933164b27630ca4231a3
|
4
|
+
data.tar.gz: ff06271dee7cfe37f0e19fa4a118b94cb22543f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8db7e126df657524e23fb2a0fe46adffac4251629eabe6f8d1c1de7a26dcfe7437a64e1c8c91b37552ffc54bc2e8b793ea4a50a319b91b799563620325836013
|
7
|
+
data.tar.gz: 360df1ca8dda98c04c5de9be94fd2ba6de232036849d299860fca3013b8edbaf849707f491eb7a45f0403f7c685c26022793f9ad7cee0c943734dc5353c8505d
|
@@ -59,6 +59,10 @@ module CornStarch
|
|
59
59
|
|
60
60
|
# Acquire Records per Page from Session / Configuration
|
61
61
|
@pagination[:recs_per_page] = (session[:pagination][:recs_per_page] || CORNSTARCH_CONF[:pagination][:records_per_page][:default]).to_i
|
62
|
+
|
63
|
+
# DEBUG
|
64
|
+
puts "================== FILTER : #{@pagination}"
|
65
|
+
|
62
66
|
end
|
63
67
|
|
64
68
|
##################
|
@@ -151,6 +155,9 @@ module CornStarch
|
|
151
155
|
total = collection.count
|
152
156
|
@pagination[:pg_count] = (total / @pagination[:recs_per_page]) + (((total % @pagination[:recs_per_page]) > 0) ? 1 : 0)
|
153
157
|
|
158
|
+
# DEBUG
|
159
|
+
puts "================== PAGINATION : #{@pagination}"
|
160
|
+
|
154
161
|
# Compute Page Range
|
155
162
|
range_start = current - (CORNSTARCH_CONF[:pagination][:page_range] / 2)
|
156
163
|
range_start = 0 if range_start < 0
|
data/lib/corn_starch/version.rb
CHANGED