3868910dde
* actioncable needs puma not webrick * add framework * remove the old way * send events from server to client * get all events working * clean up receivable * map is polymorphic on message * add the moved event * make todo comments clear * verify before streaming from map channel * rubocop fixes * wasn't set up correctly for nodejs realtime
8 lines
271 B
Ruby
8 lines
271 B
Ruby
class MapChannel < ApplicationCable::Channel
|
|
# Called when the consumer has successfully
|
|
# become a subscriber of this channel.
|
|
def subscribed
|
|
return unless Pundit.policy(current_user, Map.find(params[:id])).show?
|
|
stream_from "map_#{params[:id]}"
|
|
end
|
|
end
|