Notice: Undefined index: scheme in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 191

Notice: Undefined index: host in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 191

Notice: Undefined index: scheme in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 199

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web-data2/dukovany_cz/public_html/a/index.php:191) in /mnt/web-data2/dukovany_cz/public_html/a/index.php on line 1176
ActionCable::Channel::Callbacks::ClassMethods - Ruby on Rails API
[go: nahoru, domu]

Skip to Content Skip to Search

module ActionCable::Channel::Callbacks::ClassMethods

Public instance methods

Also aliased as: on_subscribe.

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?
Source code GitHub
# File actioncable/lib/action_cable/channel/callbacks.rb, line 60
def after_subscribe(*methods, &block)
  set_callback(:subscribe, :after, *methods, &block)
end

Also aliased as: on_unsubscribe.

Source code GitHub
# File actioncable/lib/action_cable/channel/callbacks.rb, line 69
def after_unsubscribe(*methods, &block)
  set_callback(:unsubscribe, :after, *methods, &block)
end
Source code GitHub
# File actioncable/lib/action_cable/channel/callbacks.rb, line 48
def before_subscribe(*methods, &block)
  set_callback(:subscribe, :before, *methods, &block)
end
Source code GitHub
# File actioncable/lib/action_cable/channel/callbacks.rb, line 65
def before_unsubscribe(*methods, &block)
  set_callback(:unsubscribe, :before, *methods, &block)
end

Alias for: after_subscribe.

Alias for: after_unsubscribe.

Definition files