method

after_subscribe

rails latest stable - Class: ActionCable::Channel::Callbacks::ClassMethods
after_subscribe(*methods, &block)
public

This callback will be triggered after the Base#subscribed method is called, even if the subscription was rejected with the Base#reject method.

To trigger the callback only on successful subscriptions, use the Base#subscription_rejected? method:

after_subscribe :my_method, unless: :subscription_rejected?