metamaps--metamaps/app/channels/map_channel.rb
Devin Howard d16709e8e7 fix codeclimate style issues (#1046)
* bunch of code climate fixes

* more
2017-01-23 19:30:13 -05:00

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