map is polymorphic on message

This commit is contained in:
Connor Turland 2016-12-29 23:46:15 +00:00
parent c871c0e504
commit 107b42bc88

View file

@ -17,6 +17,6 @@ class Message < ApplicationRecord
end end
def after_created def after_created
ActionCable.server.broadcast 'map_' + map.id.to_s, type: 'messageCreated', message: self.as_json ActionCable.server.broadcast 'map_' + resource.id.to_s, type: 'messageCreated', message: self.as_json
end end
end end