futurism 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/futurism/helpers.rb +2 -2
- data/lib/futurism/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 010431b087816c5ad0289d895d9206e6fc88382fa1f291fc4deb36d2c2910b42
|
4
|
+
data.tar.gz: ea1d6fd1574cabc5e91dc0d81dba80d0f64d05e9efdaf928614a457f2cc4b1d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 399ad5f2f189e569eeb031b3976137d5f9d66ee1a46c0c70ec5dd1e421817c99d525755bb16dd73146d49c15392cd2e6ea75e9f2fe44f82878b7a56e996856f8
|
7
|
+
data.tar.gz: bcd8cf6da3d6ce6557dee1d1dcb429beb49642bfaa9753a24d122265e43350022cf5bdd48b259732b4a91a7bb18d266feaa9a2819c800f8709f84eae5c9b86f9
|
data/lib/futurism/helpers.rb
CHANGED
@@ -28,8 +28,8 @@ module Futurism
|
|
28
28
|
else
|
29
29
|
collection_class_name = collection.klass.name
|
30
30
|
as = options.delete(:as) || collection_class_name.downcase
|
31
|
-
collection.map { |record|
|
32
|
-
Element.new(extends: extends, placeholder: placeholder, options: options.deep_merge(locals: {as.to_sym => record})).render
|
31
|
+
collection.each_with_index.map { |record, index|
|
32
|
+
Element.new(extends: extends, placeholder: placeholder, options: options.deep_merge(locals: {as.to_sym => record, "#{as}_counter".to_sym => index})).render
|
33
33
|
}.join.html_safe
|
34
34
|
end
|
35
35
|
end
|
data/lib/futurism/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: futurism
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Rubisch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|