twine-rails 0.1.2 → 0.1.3
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/README.md +2 -2
- data/lib/assets/javascripts/twine.js.coffee +3 -0
- data/lib/twine-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ddc2b0e558e86d41b9a5826a676b7f787e8716a
|
|
4
|
+
data.tar.gz: 86d5ab892a32b9302323cc2932f0f61c11999e98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b5fd19805c7616bdab5c0e97f09348e5e10a0ea525193cf5fcceea89398bc66596d0cff836d6c20a4afe3191cc1b70e821080d89f6ef72bb0530deef076eea4
|
|
7
|
+
data.tar.gz: 37e98561a3c75913471c3434d64ebfaf619156f582640e3ee28f609c0be12e20ca514b06b74f7519647548cf3a1b1542c2cfb3827bd7091c3b9444d13299beb8
|
data/README.md
CHANGED
|
@@ -31,9 +31,9 @@ Twine can be initialized simply with the following:
|
|
|
31
31
|
|
|
32
32
|
```html
|
|
33
33
|
<script type="text/javascript">
|
|
34
|
-
context = {}
|
|
34
|
+
var context = {};
|
|
35
35
|
$(function() {
|
|
36
|
-
Twine.reset(context).bind().refresh()
|
|
36
|
+
Twine.reset(context).bind().refresh();
|
|
37
37
|
});
|
|
38
38
|
</script>
|
|
39
39
|
```
|
|
@@ -120,6 +120,9 @@ getContext = (node, child) ->
|
|
|
120
120
|
while node
|
|
121
121
|
return rootContext if node == rootNode
|
|
122
122
|
node = node.parentNode if !child
|
|
123
|
+
if !node
|
|
124
|
+
console.warn "Unable to find context; please check that the node is attached to the DOM that Twine has bound, or that bindings have been initiated on this node's DOM"
|
|
125
|
+
return null
|
|
123
126
|
if (id = node.bindingId) && (context = elements[id]?.childContext)
|
|
124
127
|
return context
|
|
125
128
|
node = node.parentNode if child
|
data/lib/twine-rails/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twine-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Li
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2015-
|
|
13
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: coffee-rails
|