d16709e8e7
* bunch of code climate fixes * more
9 lines
301 B
Ruby
9 lines
301 B
Ruby
# frozen_string_literal: true
|
|
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
|