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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a35e39cebb067570944cfb54789c0cf9be416e13
4
- data.tar.gz: 0b75d30581076774146697ffbebf5cdfb235d4c0
3
+ metadata.gz: 1d606022e96b3c66c338e68f58355728f8b801f4
4
+ data.tar.gz: 6377f71a5054e00a7da776cc05b216cabdb3bab1
5
5
  SHA512:
6
- metadata.gz: 30244226a9192277a07fd4e01d9b6000130097b00e4b6933608125d5f9c9e2942f770eb5a64007b20bdc3ac97a08e13477b88770181673f3abd5876a19a295f2
7
- data.tar.gz: 4cc7a0fce814a64b0a2d684772a481fdaf1ece659304c9bcc2995f5b3118068c053cf0bf73c139b354c31d73ff1cfa2908e84e9f998ad5685c4745763b58e93d
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 some 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.
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.9
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(@model) if @model
19
+ args << SubContext.new(model_with_parent) if @model
18
20
 
19
21
  current_context = controller.new(*args)
20
22
  else
21
- # The user didn't specify a model, create a
22
- current_context = SubContext.new(@model || {}, $page)
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)
@@ -369,6 +369,7 @@ class Template
369
369
  end
370
370
 
371
371
  def parse_html_node(node)
372
+
372
373
  node.attribute_nodes.each do |attribute_node|
373
374
  if attribute_node.name =~ /^e\-/
374
375
  # We have an e- binding
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout