instance method
after_subscribe
Ruby on Rails 7.2.3
Since v5.2.8.1Signature
after_subscribe(*methods, &block)
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?
Parameters
-
methodsrest -
blockblock
Source
# File actioncable/lib/action_cable/channel/callbacks.rb, line 60
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
Defined in actioncable/lib/action_cable/channel/callbacks.rb line 60
· View on GitHub
· Improve this page
· Find usages on GitHub