live_record 0.0.2 → 0.0.3

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: d2aa0fed64ac30322d4fdb3a0da9547bb1105fab
4
- data.tar.gz: f68a40057334d0cf4357b23082cff7fa8b85dc03
3
+ metadata.gz: c0ded9cf6593200ae2c6ebc9456ab7e3d9b8080e
4
+ data.tar.gz: 0add3af822b794c8e002ff16afcff59051fea5cc
5
5
  SHA512:
6
- metadata.gz: 4ab01f197af30bb89b31cc4b642d72ebd76af6ae413dff5d5f76e7fa2d12fd90e9aaca1283cb26027d5fa8a8a242f0c0fe0d20ae5be4cff3bbee0ca85fb9ebfe
7
- data.tar.gz: 4749d79c4ed436e753c0a01558bb63451ed9cd6751f57d731b68c96bba08fc1c143372818d5e38aeb20ebb869613c9098d1b8b4d41ea022c4e3131d1ba1b5783
6
+ metadata.gz: 20e77e4a34688bc6513e9eac13a00e60790b4a96d82ba5f9fd3b6057c368c2d9c1a2a12a719c0dee810562a5c4be2353141a9470ad7d4d44235f5058192ebafa
7
+ data.tar.gz: d18db364eadaedb3ed37a72cd9e163ae169aa5f694d508897670e0fce13d435115e0abda7aae9948ebe58e832d9234b3905da2e335409c1075692462125a91bf
data/README.md CHANGED
@@ -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 `after_destroy` ActiveRecord callback that will broadcast changes to all subscribed JS clients
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_commit` ActiveRecord callback that will broadcast changes to all subscribed JS clients
66
66
 
67
67
  ## Setup
68
68
  * Add the following to your `Gemfile`:
@@ -9,7 +9,11 @@ module LiveRecord
9
9
 
10
10
  if authorised_attributes.present?
11
11
  stream_for record, coder: ActiveSupport::JSON do |message|
12
- record.reload
12
+ begin
13
+ record.reload
14
+ rescue ActiveRecord::RecordNotFound
15
+ end
16
+
13
17
  authorised_attributes = authorised_attributes(record, current_user)
14
18
 
15
19
  if authorised_attributes.present?
@@ -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
- after_destroy :__live_record_broadcast_record_destroy__
10
+ after_destroy_commit :__live_record_broadcast_record_destroy__
11
11
 
12
12
  def self.live_record_whitelisted_attributes(record, current_user)
13
13
  []
@@ -1,3 +1,3 @@
1
1
  module LiveRecord
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: live_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jules Roman B. Polidario