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: 526e7e7db14d2a876ff88a99ae866fa13134fa7a
4
- data.tar.gz: c589e3b8d720c13ae377b0592d4798f61ac0dd00
3
+ metadata.gz: 58b0df924ee01d3ae158b0e10570e783f3720d62
4
+ data.tar.gz: 39c786ebecced41a060964cb884bc812dc601161
5
5
  SHA512:
6
- metadata.gz: 46cd8b93ea8e032210048db5b961d5e6d86048a2473e1e5c5647ecc0f39e491bf8c2ce4ef239f60537dee0982e44b20ab2f5dc72748e410d7cac72648e558623
7
- data.tar.gz: 406ddae50931f9a9d8ac38e4f80844582975de5685d4f86eb50fadf37fd04c4ffe9d4f154d7824eeea1fc14167b5649ef262403f76b63d9b04af3546b601b5db
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
 
@@ -1,3 +1,5 @@
1
+ module ModelUpdates; end
2
+
1
3
  class ModelUpdates::Engine < ::Rails::Engine
2
4
  isolate_namespace ModelUpdates
3
5
  end
@@ -1,3 +1,3 @@
1
1
  module ModelUpdates
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.2".freeze
3
3
  end
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.1
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-24 00:00:00.000000000 Z
11
+ date: 2017-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails