model_updates 0.0.1 → 0.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58b0df924ee01d3ae158b0e10570e783f3720d62
|
4
|
+
data.tar.gz: 39c786ebecced41a060964cb884bc812dc601161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8528ad7fab74214a87c97e898bfaf4c18237e9ac34ae9d9e3a75a38603dda9bfcfbcb4b0dc6a792b7313e25b5a5f73f54a1a7c443cead13baf29db5a1ba4780b
|
7
|
+
data.tar.gz: a9f3762159877625d2a4b2b5a18206c91e34164635ed55c1a802ac79b2b8b83e9eb545cc56fe2a44349f92b6cf7858864de5e5513a032519df89e76fa40c1246
|
@@ -15,10 +15,14 @@ $(document).ready(function() {
|
|
15
15
|
// Subscribe to the found models
|
16
16
|
for(var model_type in model_subscriptions) {
|
17
17
|
for(var model_id in model_subscriptions[model_type]) {
|
18
|
+
console.log("Subscribing " + model_type + "(" + model_id + ")")
|
19
|
+
|
18
20
|
App.cable.subscriptions.create(
|
19
21
|
{channel: "ModelUpdates::ModelChannel", id: model_id, model: model_type},
|
20
22
|
{
|
21
23
|
received: function(json) {
|
24
|
+
console.log("Update from: " + json.model + "(" + json.id + ")")
|
25
|
+
|
22
26
|
for(key in json.changes) {
|
23
27
|
element = $(".model-updates[data-model-updates-model='" + json.model + "'][data-model-updates-id='" + json.id + "'][data-model-updates-key='" + key + "']")
|
24
28
|
|
data/lib/model_updates/engine.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: model_updates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|