live_record 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 +4 -4
- data/README.md +2 -2
- data/lib/live_record/model.rb +1 -1
- data/lib/live_record/version.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: d2aa0fed64ac30322d4fdb3a0da9547bb1105fab
|
4
|
+
data.tar.gz: f68a40057334d0cf4357b23082cff7fa8b85dc03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ab01f197af30bb89b31cc4b642d72ebd76af6ae413dff5d5f76e7fa2d12fd90e9aaca1283cb26027d5fa8a8a242f0c0fe0d20ae5be4cff3bbee0ca85fb9ebfe
|
7
|
+
data.tar.gz: 4749d79c4ed436e753c0a01558bb63451ed9cd6751f57d731b68c96bba08fc1c143372818d5e38aeb20ebb869613c9098d1b8b4d41ea022c4e3131d1ba1b5783
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
## Demo
|
16
16
|
|
17
|
-
* https://
|
17
|
+
* https://live-record-example.herokuapp.com/posts
|
18
18
|
|
19
19
|
## Usage Example
|
20
20
|
|
@@ -62,7 +62,7 @@
|
|
62
62
|
end
|
63
63
|
```
|
64
64
|
|
65
|
-
* whenever a Book (or any other Model record that you specified) has been updated / destroyed, there exists an `after_update_commit` and an `
|
65
|
+
* whenever a Book (or any other Model record that you specified) has been updated / destroyed, there exists an `after_update_commit` and an `after_destroy` ActiveRecord callback that will broadcast changes to all subscribed JS clients
|
66
66
|
|
67
67
|
## Setup
|
68
68
|
* Add the following to your `Gemfile`:
|
data/lib/live_record/model.rb
CHANGED
@@ -7,7 +7,7 @@ module LiveRecord
|
|
7
7
|
|
8
8
|
after_update :__live_record_reference_changed_attributes__
|
9
9
|
after_update_commit :__live_record_broadcast_record_update__
|
10
|
-
|
10
|
+
after_destroy :__live_record_broadcast_record_destroy__
|
11
11
|
|
12
12
|
def self.live_record_whitelisted_attributes(record, current_user)
|
13
13
|
[]
|
data/lib/live_record/version.rb
CHANGED