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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8bbd52daa2dfe15d3a6dc9c9e374d6be65299a42a7ee3975cee51838811f7783
4
- data.tar.gz: 29bcba992840173fe09f1e67ecdfa387dfedc8b8574d1ef988a4f98b55142bd2
3
+ metadata.gz: 010431b087816c5ad0289d895d9206e6fc88382fa1f291fc4deb36d2c2910b42
4
+ data.tar.gz: ea1d6fd1574cabc5e91dc0d81dba80d0f64d05e9efdaf928614a457f2cc4b1d5
5
5
  SHA512:
6
- metadata.gz: 6efdbccf19c4c0b9a16f92f8461cb9fb8153796b81f6cbdd981e7d16779cca93a907033fbff2dac3bd354a22335e22d014a46f14bda18d4ad973605447ef1f20
7
- data.tar.gz: b642b4d646ae5b1047330a833f7d4c7eeb8c684f15337835afc1b56f5d1b51cf0fea9ac9234a693562152b92d09f5febea8eb415b0aa4a8c97a77c96ae2cd42f
6
+ metadata.gz: 399ad5f2f189e569eeb031b3976137d5f9d66ee1a46c0c70ec5dd1e421817c99d525755bb16dd73146d49c15392cd2e6ea75e9f2fe44f82878b7a56e996856f8
7
+ data.tar.gz: bcd8cf6da3d6ce6557dee1d1dcb429beb49642bfaa9753a24d122265e43350022cf5bdd48b259732b4a91a7bb18d266feaa9a2819c800f8709f84eae5c9b86f9
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Futurism
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
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.1
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-30 00:00:00.000000000 Z
11
+ date: 2020-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal