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 +4 -4
- data/lib/spark_components/element.rb +6 -6
- data/lib/spark_components/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: 79ef9257801e949b479f55bb340493f817da31a857efc7e1a5e3bf6d5b7eab80
|
4
|
+
data.tar.gz: d69458744f2e2842e7b695914c7b671065f5bd5fb23ff9f528f8e393a4b2784a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
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.
|
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-
|
11
|
+
date: 2019-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|