volt 0.5.9 → 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +1 -1
- data/VERSION +1 -1
- data/lib/volt/page/bindings/component_binding.rb +5 -3
- data/lib/volt/server/template_parser.rb +1 -0
- 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: 1d606022e96b3c66c338e68f58355728f8b801f4
|
4
|
+
data.tar.gz: 6377f71a5054e00a7da776cc05b216cabdb3bab1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb4f2b5751bdbd886987fb7ddefe6a9b455ba61f7fd951a5538435d11e154880dcb63949ccb0cc8e98c1174aeb77c76fbb821f3cbbd50f72d57ab9f451f5ff9b
|
7
|
+
data.tar.gz: a36b1aa6e6b47f0e5b1ee8086ecda80ce6bd9de5970ad143830aff2afeb2ac3710480c7114cd5bd5057a44aafe6354f3f68c2e1c92df59cb8f443fe34da81ee0
|
data/Readme.md
CHANGED
@@ -210,7 +210,7 @@ Simply use:
|
|
210
210
|
|
211
211
|
### With
|
212
212
|
|
213
|
-
Normally when you want to have
|
213
|
+
Normally when you want to have a value that depends on another value, but transforms it somehow, you simply call your transform method on the ReactiveValue. However sometimes the transform is not directly on the ReactiveValue's object.
|
214
214
|
|
215
215
|
You can call .with on any ReactiveValue. .with will return a new ReactiveValue that depends on the current ReactiveValue. .with takes a block, the first argument to the block will be the cur value of the ReactiveValue you called with on. Any additional arguments to with will be passed in after the first one. If you pass another ReactiveValue as an argument to .with, the returned ReactiveValue will depend on the argument ReactiveValue as well, and the block will receive the arguments cur value.
|
216
216
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.10
|
@@ -10,16 +10,18 @@ class ComponentBinding < TemplateBinding
|
|
10
10
|
# TODO: at the moment a :body section and a :title will both initialize different
|
11
11
|
# controllers. Maybe we should have a way to tie them together?
|
12
12
|
controller = get_controller(controller_name)
|
13
|
+
model_with_parent = {parent: @context}.merge(@model || {})
|
14
|
+
|
13
15
|
if controller
|
14
16
|
# The user provided a controller, pass in the model as an argument (in a
|
15
17
|
# sub-context)
|
16
18
|
args = []
|
17
|
-
args << SubContext.new(
|
19
|
+
args << SubContext.new(model_with_parent) if @model
|
18
20
|
|
19
21
|
current_context = controller.new(*args)
|
20
22
|
else
|
21
|
-
#
|
22
|
-
current_context = SubContext.new(
|
23
|
+
# There is not a controller
|
24
|
+
current_context = SubContext.new(model_with_parent, $page)
|
23
25
|
end
|
24
26
|
|
25
27
|
@current_template = TemplateRenderer.new(@target, current_context, @binding_name, full_path)
|