volt 0.3.9 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/volt/page/bindings/content_binding.rb +7 -3
- data/lib/volt/page/bindings/template_binding.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10cc84012e873b87e79b5cd770e387ab1c292b03
|
4
|
+
data.tar.gz: 2ba97e0d7442c60768ba4ceacf5c9ca13d96db6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cf7ccd40cea80341c5138c59a7d8057143478f8ebbf6148fd3a2f050e1088fa6a94cf8a5591f9de93f848884d9ec50ef84ebb7031936a634583b6e3b357e686
|
7
|
+
data.tar.gz: a28b2acab7c75e6fb85e48ee54c5c1ebc29a0851bd8d31e9badde216be6b23c820900fdca47c58a4ca9d476ed0aedc39f1ce83bfa07a984ad0b06435bad78266
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
@@ -11,7 +11,9 @@ class ContentBinding < BaseBinding
|
|
11
11
|
# Run the initial render
|
12
12
|
update
|
13
13
|
|
14
|
-
|
14
|
+
if @value.reactive?
|
15
|
+
@changed_listener = @value.on('changed') { update }
|
16
|
+
end
|
15
17
|
end
|
16
18
|
|
17
19
|
def update
|
@@ -25,8 +27,10 @@ class ContentBinding < BaseBinding
|
|
25
27
|
end
|
26
28
|
|
27
29
|
def remove
|
28
|
-
@changed_listener
|
29
|
-
|
30
|
+
if @changed_listener
|
31
|
+
@changed_listener.remove
|
32
|
+
@changed_listener = nil
|
33
|
+
end
|
30
34
|
|
31
35
|
super
|
32
36
|
end
|
@@ -131,7 +131,7 @@ class TemplateBinding < BaseBinding
|
|
131
131
|
controller = get_controller(controller_name)
|
132
132
|
|
133
133
|
# Initialize the new controller
|
134
|
-
current_context = (
|
134
|
+
current_context = (controller || ModelController).new(*args)
|
135
135
|
elsif @model
|
136
136
|
# Passed in attributes, but there is no controller
|
137
137
|
current_context = SubContext.new(@model, current_context)
|