Deletion broadcast cleanup

pull/527/head
Rick Carlino 2017-10-26 09:58:00 -05:00
parent 72d94c6eb0
commit aae6f1305b
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ class ApplicationRecord < ActiveRecord::Base
end
def broadcast_payload
{ body: destroyed? ? "null" : self.as_json }.to_json
body = (destroyed? ? nil : self).as_json
{ body: body }.to_json
end
def chan_name