corn_starch 1.7.19 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/corn_starch/infiniscroll_helper.rb +8 -2
- data/lib/corn_starch/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: 620279ae2b8fd7810cd6ebee173888f144bdb9e3
|
4
|
+
data.tar.gz: b152e25717df87ec5ae1a1758aea03921569359c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eec89881d2374402b3fed83eddb269970956939d6e22b94f11b1b1788694360b4b3383eceeda8b8ecf99c080c29629292e3d75dc7e9d9ba946c3c6fe9fffc96b
|
7
|
+
data.tar.gz: fc9893d9516896fd25575cc041b9b33d99d8e6abd8c2a1e0923206ee6036a674079524b6111c59567e9cbaec5d29a142cd8c3726f4465d199b3ceaa1fd286496
|
@@ -8,7 +8,7 @@ module CornStarch
|
|
8
8
|
module InfiniscrollHelper
|
9
9
|
|
10
10
|
# InfiniScroll Container
|
11
|
-
def infiniscroll_container id, target, extra_args = nil, n = 1
|
11
|
+
def infiniscroll_container id, target, extra_args = nil, template = nil, n = 1
|
12
12
|
|
13
13
|
# Prep Args
|
14
14
|
first = true
|
@@ -29,7 +29,13 @@ module CornStarch
|
|
29
29
|
args = args + (first ? '?' : '&') + extra_args.to_query if extra_args
|
30
30
|
|
31
31
|
# Produce Container
|
32
|
-
div_tag id: id, class: 'infiniscroll-container', 'infiniscroll-trgt' => target, 'infiniscroll-args' => args, 'infiniscroll-next' => n, 'infiniscroll-margin' => CORNSTARCH_CONF[:infiniscroll][:margin]
|
32
|
+
div_tag id: id, class: 'infiniscroll-container', 'infiniscroll-trgt' => target, 'infiniscroll-args' => args, 'infiniscroll-next' => n, 'infiniscroll-margin' => CORNSTARCH_CONF[:infiniscroll][:margin] do
|
33
|
+
if template
|
34
|
+
render partial: template, locals: extra_args
|
35
|
+
else
|
36
|
+
yield extra_args if block_given?
|
37
|
+
end
|
38
|
+
end
|
33
39
|
end
|
34
40
|
end
|
35
41
|
end
|
data/lib/corn_starch/version.rb
CHANGED