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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7c231071b3875fc47ac4f17f47c17b3bf09bc8e
4
- data.tar.gz: f9bdc1bc9d11ba2889b8b61ea25b3f59740b141c
3
+ metadata.gz: 620279ae2b8fd7810cd6ebee173888f144bdb9e3
4
+ data.tar.gz: b152e25717df87ec5ae1a1758aea03921569359c
5
5
  SHA512:
6
- metadata.gz: 7b5190de99a25868f984a43ad44c2265d302fabc9722e49e1e751eec6f3e3e6440539a7e83cde1581081eaa877c6e18657b6e95885d6b7b82f354856fe413de9
7
- data.tar.gz: 42fcc70bc2b70c25a42247fd906d03b64bdab2761b66cc3fdca0b2a0220ed12586f20a3ab7ff7f6d866da2c1949f868682c779c25116e6ba4e66d250f1ddafd3
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, &block
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], &block
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
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.7.19'
2
+ VERSION = '1.8.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.19
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse