volt 0.5.17 → 0.5.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/volt/page/bindings/component_binding.rb +3 -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: 772c4d0aaa812cfcf06f57870866fb11a7048e5f
|
4
|
+
data.tar.gz: 2acf6521c5efa480cb06857becb68133cce953c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34531249996f8ef4b435c60b70d08fdccc1558049f669ea19c738ce5bf05b8c7d6ea9452b1ca0e135d5d472be3d5cd7bdc45a550c044a54f6597d8e2f0fbc80f
|
7
|
+
data.tar.gz: b6d154d43b4226306965eed1aa8b04b4b15891b5c4c133dac70a0565e838d058203b9bd15a6b77810b73b1d1d55aa6b4c20e6e862b96c48256352cc5d7fc47ab
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.18
|
@@ -9,16 +9,16 @@ class ComponentBinding < TemplateBinding
|
|
9
9
|
def render_template(full_path, controller_name)
|
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_class = get_controller(controller_name)
|
13
13
|
model_with_parent = {parent: @context}.merge(@model || {})
|
14
14
|
|
15
|
-
if
|
15
|
+
if controller_class
|
16
16
|
# The user provided a controller, pass in the model as an argument (in a
|
17
17
|
# sub-context)
|
18
18
|
args = []
|
19
19
|
args << SubContext.new(model_with_parent) if @model
|
20
20
|
|
21
|
-
current_context =
|
21
|
+
current_context = controller_class.new(*args)
|
22
22
|
@controller = current_context
|
23
23
|
else
|
24
24
|
# There is not a controller
|
@@ -134,7 +134,7 @@ class TemplateBinding < BaseBinding
|
|
134
134
|
args << SubContext.new(@model) if @model
|
135
135
|
|
136
136
|
# Setup the controller
|
137
|
-
current_context =
|
137
|
+
current_context = controller_class.new(*args)
|
138
138
|
@controller = current_context
|
139
139
|
else
|
140
140
|
# Pass the context directly
|