spark_components 1.2.0 → 1.2.1

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: d4b5587ecfcc831c00cce7081d68b2a05fd8d1e40e05fb8e67d42575d50fb59b
4
- data.tar.gz: 469503443e27a39caf829f702be3de802bb040826931390c9cb6611fea419115
3
+ metadata.gz: 79ef9257801e949b479f55bb340493f817da31a857efc7e1a5e3bf6d5b7eab80
4
+ data.tar.gz: d69458744f2e2842e7b695914c7b671065f5bd5fb23ff9f528f8e393a4b2784a
5
5
  SHA512:
6
- metadata.gz: 3cac7acf659a200fcc4d56f01d4d99170d31bd09b94b78fbf26be4a15e1c07c1f1e629c9b835861c9fb6802011fc786757c56aea438e05b497569d8f552bd678
7
- data.tar.gz: 1c1c34bf7e139fd8d021cd3516706ee41603b8ba1578e66969824c272274935209694feab07567ad2fea33922147924630d1da48652053df0c26af8694423b80
6
+ metadata.gz: eb076f9c750b911b720110f6c5dd3f7228baeb249b1918b83d6254edb7a6583b216eaaec282cc25565d2bde116748c76668c353cf85bdb7edaaefe347afcdf1e
7
+ data.tar.gz: a4c977da0f622b0e59c9cc4cd523d20a9db126cf4f5ad3d005a9d701e3a72d8376267a8cc5bfaaca71e875332e65906f8404154e2b6c074778156c8d538ff4bf
@@ -109,16 +109,17 @@ module SparkComponents
109
109
  element = self.class.elements[name][:class].new(@view, attributes, &block)
110
110
  element.parent = self
111
111
 
112
- if element.respond_to?(:render)
113
- element.before_render
114
- element.yield = element.render
115
- end
116
-
117
112
  if multiple
118
113
  get_instance_variable(plural_name) << element
119
114
  else
120
115
  set_instance_variable(name, element)
121
116
  end
117
+
118
+ if element.respond_to?(:render)
119
+ element.before_render
120
+ element.yield = element.render
121
+ end
122
+
122
123
  end
123
124
 
124
125
  return if !multiple || name == plural_name
@@ -209,7 +210,6 @@ module SparkComponents
209
210
  def attrs(add_class: true)
210
211
  atr = Attributes::Hash.new
211
212
  # attrtiubte order: id, class, data-, aria-, misc tag attributes
212
- atr[:id] = tag_attr.delete(:id)
213
213
  atr[:class] = classnames if add_class
214
214
  atr.merge!(data_attr.collapse)
215
215
  atr.merge!(aria_attr.collapse)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SparkComponents
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spark_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-21 00:00:00.000000000 Z
11
+ date: 2019-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails