+ Ruby on Rails 7.1.3
diff --git a/src/classes/AbstractController/ActionNotFound.html b/src/classes/AbstractController/ActionNotFound.html
index c67fe92703..b315279511 100644
--- a/src/classes/AbstractController/ActionNotFound.html
+++ b/src/classes/AbstractController/ActionNotFound.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/AbstractController/Base.html b/src/classes/AbstractController/Base.html
index f57451fc63..fa56d50242 100644
--- a/src/classes/AbstractController/Base.html
+++ b/src/classes/AbstractController/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -73,11 +73,11 @@ Methods
- controller_path
+ controller_path
- controller_path
+ controller_path
@@ -191,7 +191,7 @@
@abstract = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -239,7 +239,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -274,7 +274,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -321,7 +321,7 @@ Returns
@controller_path ||= name.delete_suffix("Controller").underscore unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
controller.public_instance_methods(true) - methods
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -400,7 +400,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -435,7 +435,7 @@
true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -474,7 +474,7 @@
self.class.action_methods
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -508,7 +508,7 @@
attr_internal :action_name
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -550,7 +550,7 @@ Parameters
_find_action_name(action_name)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -585,7 +585,7 @@
self.class.controller_path
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -619,7 +619,7 @@
attr_internal :formats
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -654,7 +654,7 @@
response_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -669,7 +669,7 @@
- Calls the action going through the entire action dispatch stack.
+ Calls the action going through the entire Action Dispatch stack.
The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound
error is raised.
@@ -704,7 +704,7 @@ Returns
process_action(action_name, *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -738,7 +738,7 @@
attr_internal :response_body
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html
index 4a0afd210d..aff27b6732 100644
--- a/src/classes/AbstractController/Caching.html
+++ b/src/classes/AbstractController/Caching.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
diff --git a/src/classes/AbstractController/Base.html b/src/classes/AbstractController/Base.html
index f57451fc63..fa56d50242 100644
--- a/src/classes/AbstractController/Base.html
+++ b/src/classes/AbstractController/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -73,11 +73,11 @@ Methods
- controller_path
+ controller_path
- controller_path
+ controller_path
@@ -191,7 +191,7 @@
@abstract = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -239,7 +239,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -274,7 +274,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -321,7 +321,7 @@ Returns
@controller_path ||= name.delete_suffix("Controller").underscore unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
controller.public_instance_methods(true) - methods
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -400,7 +400,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -435,7 +435,7 @@
true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -474,7 +474,7 @@
self.class.action_methods
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -508,7 +508,7 @@
attr_internal :action_name
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -550,7 +550,7 @@ Parameters
_find_action_name(action_name)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -585,7 +585,7 @@
self.class.controller_path
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -619,7 +619,7 @@
attr_internal :formats
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -654,7 +654,7 @@
response_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -669,7 +669,7 @@
- Calls the action going through the entire action dispatch stack.
+ Calls the action going through the entire Action Dispatch stack.
The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound
error is raised.
@@ -704,7 +704,7 @@ Returns
process_action(action_name, *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -738,7 +738,7 @@
attr_internal :response_body
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html
index 4a0afd210d..aff27b6732 100644
--- a/src/classes/AbstractController/Caching.html
+++ b/src/classes/AbstractController/Caching.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -73,11 +73,11 @@ Methods
@abstract = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -239,7 +239,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -274,7 +274,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -321,7 +321,7 @@ Returns
@controller_path ||= name.delete_suffix("Controller").underscore unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
controller.public_instance_methods(true) - methods
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -400,7 +400,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -435,7 +435,7 @@
true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -474,7 +474,7 @@
self.class.action_methods
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -508,7 +508,7 @@
attr_internal :action_name
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -550,7 +550,7 @@ Parameters
_find_action_name(action_name)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -585,7 +585,7 @@
self.class.controller_path
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -619,7 +619,7 @@
attr_internal :formats
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -654,7 +654,7 @@
response_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -669,7 +669,7 @@
- Calls the action going through the entire action dispatch stack.
+ Calls the action going through the entire Action Dispatch stack.
The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound
error is raised.
@@ -704,7 +704,7 @@ Returns
process_action(action_name, *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -738,7 +738,7 @@
attr_internal :response_body
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html
index 4a0afd210d..aff27b6732 100644
--- a/src/classes/AbstractController/Caching.html
+++ b/src/classes/AbstractController/Caching.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
Returns
@controller_path ||= name.delete_suffix("Controller").underscore unless anonymous? end - 🔎 See on GitHub + 🔎 See on GitHub @@ -364,7 +364,7 @@
controller.public_instance_methods(true) - methods
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -400,7 +400,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -435,7 +435,7 @@
true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -474,7 +474,7 @@
self.class.action_methods
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -508,7 +508,7 @@
attr_internal :action_name
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -550,7 +550,7 @@ Parameters
_find_action_name(action_name)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -585,7 +585,7 @@
self.class.controller_path
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -619,7 +619,7 @@
attr_internal :formats
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -654,7 +654,7 @@
response_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -669,7 +669,7 @@
- Calls the action going through the entire action dispatch stack.
+ Calls the action going through the entire Action Dispatch stack.
The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound
error is raised.
@@ -704,7 +704,7 @@ Returns
process_action(action_name, *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -738,7 +738,7 @@
attr_internal :response_body
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html
index 4a0afd210d..aff27b6732 100644
--- a/src/classes/AbstractController/Caching.html
+++ b/src/classes/AbstractController/Caching.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -474,7 +474,7 @@
self.class.action_methods
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -508,7 +508,7 @@
attr_internal :action_name
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -550,7 +550,7 @@ Parameters
_find_action_name(action_name)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -585,7 +585,7 @@
self.class.controller_path
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -619,7 +619,7 @@
attr_internal :formats
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -654,7 +654,7 @@
response_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -669,7 +669,7 @@
- Calls the action going through the entire action dispatch stack.
+ Calls the action going through the entire Action Dispatch stack.
The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound
error is raised.
@@ -704,7 +704,7 @@ Returns
process_action(action_name, *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -738,7 +738,7 @@
attr_internal :response_body
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html
index 4a0afd210d..aff27b6732 100644
--- a/src/classes/AbstractController/Caching.html
+++ b/src/classes/AbstractController/Caching.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
attr_internal :action_name
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -550,7 +550,7 @@ Parameters
_find_action_name(action_name)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -585,7 +585,7 @@
self.class.controller_path
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -619,7 +619,7 @@
attr_internal :formats
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -654,7 +654,7 @@
response_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -669,7 +669,7 @@
- Calls the action going through the entire action dispatch stack.
+ Calls the action going through the entire Action Dispatch stack.
The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound
error is raised.
@@ -704,7 +704,7 @@ Returns
process_action(action_name, *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -738,7 +738,7 @@
attr_internal :response_body
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html
index 4a0afd210d..aff27b6732 100644
--- a/src/classes/AbstractController/Caching.html
+++ b/src/classes/AbstractController/Caching.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
attr_internal :formats
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -654,7 +654,7 @@
response_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -669,7 +669,7 @@
- Calls the action going through the entire action dispatch stack.
+ Calls the action going through the entire Action Dispatch stack.
The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound
error is raised.
@@ -704,7 +704,7 @@ Returns
process_action(action_name, *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -738,7 +738,7 @@
attr_internal :response_body
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html
index 4a0afd210d..aff27b6732 100644
--- a/src/classes/AbstractController/Caching.html
+++ b/src/classes/AbstractController/Caching.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
- Calls the action going through the entire action dispatch stack.
+ Calls the action going through the entire Action Dispatch stack.
The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound
error is raised.
@@ -704,7 +704,7 @@ Returns
process_action(action_name, *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -738,7 +738,7 @@
attr_internal :response_body
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html
index 4a0afd210d..aff27b6732 100644
--- a/src/classes/AbstractController/Caching.html
+++ b/src/classes/AbstractController/Caching.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
Calls the action going through the entire action dispatch stack.
+Calls the action going through the entire Action Dispatch stack.
The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound
error is raised.
Returns
process_action(action_name, *args) end - 🔎 See on GitHub + 🔎 See on GitHub @@ -738,7 +738,7 @@
attr_internal :response_body
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html
index 4a0afd210d..aff27b6732 100644
--- a/src/classes/AbstractController/Caching.html
+++ b/src/classes/AbstractController/Caching.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -131,7 +131,7 @@
self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -173,7 +173,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html
index 257f45c5d6..2dcce76018 100644
--- a/src/classes/AbstractController/Caching/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -510,7 +510,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html
index 75d08b6658..1a46aa6b34 100644
--- a/src/classes/AbstractController/Collector.html
+++ b/src/classes/AbstractController/Collector.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -86,7 +86,7 @@
self._view_cache_dependencies += [dependency]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html
index 3afe6ca778..ca1881a982 100644
--- a/src/classes/AbstractController/Caching/ConfigMethods.html
+++ b/src/classes/AbstractController/Caching/ConfigMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -462,7 +462,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -486,7 +486,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
+ Ruby on Rails 7.1.3
@@ -90,7 +90,7 @@
config.cache_store
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -125,7 +125,7 @@
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
config.cache_store = ActiveSupport::Cache.lookup_store(*store)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html
index c9844c4596..4a4477a519 100644
--- a/src/classes/AbstractController/Caching/Fragments.html
+++ b/src/classes/AbstractController/Caching/Fragments.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -412,7 +412,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -438,7 +438,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
+ Ruby on Rails 7.1.3
@@ -134,7 +134,7 @@
cache_key
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -189,7 +189,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -229,7 +229,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -270,7 +270,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
content
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
index 2cb27b8940..c3c06e0721 100644
--- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
+++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -364,7 +364,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
+ Ruby on Rails 7.1.3
@@ -102,7 +102,7 @@
self.fragment_cache_keys += [key || -> { value }]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Callbacks.html b/src/classes/AbstractController/Callbacks.html
index 6afbb6e868..e3d13b12bb 100644
--- a/src/classes/AbstractController/Callbacks.html
+++ b/src/classes/AbstractController/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -314,7 +314,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -338,7 +338,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
+ Ruby on Rails 7.1.3
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html
index 6d9061921b..94189a842c 100644
--- a/src/classes/AbstractController/Callbacks/ClassMethods.html
+++ b/src/classes/AbstractController/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -264,7 +264,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -288,7 +288,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
+ Ruby on Rails 7.1.3
@@ -159,7 +159,7 @@ Block Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,7 +214,7 @@ Options
_normalize_callback_option(options, :except, :unless)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -240,7 +240,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
+ Ruby on Rails 7.1.3
@@ -91,7 +91,7 @@
RUBY
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html
index aa4aaae7eb..b874652177 100644
--- a/src/classes/AbstractController/DoubleRenderError.html
+++ b/src/classes/AbstractController/DoubleRenderError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -104,7 +104,7 @@
super(message || DEFAULT_MESSAGE)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html
index 0db1e7a884..e5a7e6f463 100644
--- a/src/classes/AbstractController/Helpers.html
+++ b/src/classes/AbstractController/Helpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -120,7 +120,7 @@
self.class._helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html
index 9478735755..fc440f9f86 100644
--- a/src/classes/AbstractController/Helpers/ClassMethods.html
+++ b/src/classes/AbstractController/Helpers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -195,7 +195,7 @@
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
index be188d929b..3e9ed99ec5 100644
--- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
+++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -127,7 +127,7 @@
_helpers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -157,7 +157,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
- 🔎 See on GitHub + 🔎 See on GitHub
default_helper_module! unless anonymous?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -283,7 +283,7 @@
_helpers_for_modification.module_eval(&block) if block_given?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -358,7 +358,7 @@ Parameters
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
Parameters
end end - 🔎 See on GitHub + 🔎 See on GitHub @@ -397,7 +397,7 @@
super
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -423,7 +423,7 @@
- 🔎 See on GitHub
+ 🔎 See on GitHub
+ Ruby on Rails 7.1.3
@@ -99,7 +99,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Railties.html b/src/classes/AbstractController/Railties.html
index 99f79c7392..3f2bad0332 100644
--- a/src/classes/AbstractController/Railties.html
+++ b/src/classes/AbstractController/Railties.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html
index bc1ec8407a..bcc721931e 100644
--- a/src/classes/AbstractController/Railties/RoutesHelpers.html
+++ b/src/classes/AbstractController/Railties/RoutesHelpers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -95,7 +95,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html
index 0116e8254e..7a0e28da22 100644
--- a/src/classes/AbstractController/Rendering.html
+++ b/src/classes/AbstractController/Rendering.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -151,7 +151,7 @@
self.response_body = rendered_body
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -185,7 +185,7 @@
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
def render_to_body(options = {})
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -223,7 +223,7 @@
render_to_body(options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -258,7 +258,7 @@
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
Mime[:text]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -297,7 +297,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -345,7 +345,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -380,7 +380,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -415,7 +415,7 @@
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
options
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html
index 2d2007b158..87aa62830b 100644
--- a/src/classes/AbstractController/Translation.html
+++ b/src/classes/AbstractController/Translation.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -127,7 +127,7 @@
I18n.localize(object, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -201,7 +201,7 @@
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
ActiveSupport::HtmlSafeTranslation.translate(key, **options)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html
index 2dbea1b847..2604544166 100644
--- a/src/classes/AbstractController/UrlFor.html
+++ b/src/classes/AbstractController/UrlFor.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -124,7 +124,7 @@
"For instance, `include Rails.application.routes.url_helpers`."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html
index 4ea1465fbb..298c513236 100644
--- a/src/classes/AbstractController/UrlFor/ClassMethods.html
+++ b/src/classes/AbstractController/UrlFor/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -90,7 +90,7 @@
nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -129,7 +129,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html
index ff9a14bd75..dae1e7745e 100644
--- a/src/classes/ActionCable.html
+++ b/src/classes/ActionCable.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -269,7 +269,7 @@
Gem::Version.new VERSION::STRING
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -304,7 +304,7 @@
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
gem_version
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -343,7 +343,7 @@
@server ||= ActionCable::Server::Base.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel.html b/src/classes/ActionCable/Channel.html
index b9f20ffd03..42d3430957 100644
--- a/src/classes/ActionCable/Channel.html
+++ b/src/classes/ActionCable/Channel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html
index 2986c9dcdd..40c8fc885e 100644
--- a/src/classes/ActionCable/Channel/Base.html
+++ b/src/classes/ActionCable/Channel/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -319,7 +319,7 @@ Returns
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -367,7 +367,7 @@
delegate_connection_identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -405,7 +405,7 @@
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
@action_methods = nil
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -441,7 +441,7 @@
clear_action_methods!
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -489,7 +489,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -529,7 +529,7 @@
ensure_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -567,7 +567,7 @@
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
@defer_subscription_confirmation_counter.increment
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -602,7 +602,7 @@
@defer_subscription_confirmation_counter.value > 0
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -639,7 +639,7 @@
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
transmit_subscription_confirmation unless defer_subscription_confirmation?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -674,7 +674,7 @@
@reject_subscription = true
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -709,7 +709,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -744,7 +744,7 @@
@subscription_confirmation_sent
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -779,7 +779,7 @@
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
@reject_subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -823,7 +823,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -858,7 +858,7 @@
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
# Override in subclasses
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html
index 45f1de6aff..9462052e71 100644
--- a/src/classes/ActionCable/Channel/Broadcasting.html
+++ b/src/classes/ActionCable/Channel/Broadcasting.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
index 220ec1298d..22b96e928e 100644
--- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -90,7 +90,7 @@
ActionCable.server.broadcast(broadcasting_for(model), message)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -130,7 +130,7 @@
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
serialize_broadcasting([ channel_name, model ])
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Callbacks.html b/src/classes/ActionCable/Channel/Callbacks.html
index ce9f483f24..45f2aa1e5f 100644
--- a/src/classes/ActionCable/Channel/Callbacks.html
+++ b/src/classes/ActionCable/Channel/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
+Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
before_subscribe
+
-
-
after_subscribe
(also aliased as: on_subscribe
)
+after_subscribe (aliased as on_subscribe)
-
-
before_unsubscribe
+
-
-
after_unsubscribe
(also aliased as: on_unsubscribe
)
+after_unsubscribe (aliased as on_unsubscribe)
-NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
+Example
+
+class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
index 1ef18852c8..dd71b042af 100644
--- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
+ Ruby on Rails 7.1.3
@@ -25,18 +25,33 @@
Action Cable Channel Callbacks
-
Action Cable Channel Callbacks
-Action Cable Channel
provides hooks during the life cycle of a channel subscription. Callbacks
allow triggering logic during this cycle. Available callbacks are:
Action Cable Channel
provides callback hooks that are invoked during the life cycle of a channel:
-
-
+before_subscribe
-
-
+after_subscribe
(also aliased as:on_subscribe
)after_subscribe (aliased as on_subscribe)
-
-
+before_unsubscribe
-
-
+after_unsubscribe
(also aliased as:on_unsubscribe
)after_unsubscribe (aliased as on_unsubscribe)
NOTE: the after_subscribe
callback is triggered whenever the subscribed
method is called, even if subscription was rejected with the reject
method. To trigger after_subscribe
only on successful subscriptions, use after_subscribe :my_method_name, unless: :subscription_rejected?
Example
+ +class ChatChannel < ApplicationCable::Channel
+ after_subscribe :send_welcome_message, unless: :subscription_rejected?
+ after_subscribe :track_subscription
+
+ private
+ def send_welcome_message
+ broadcast_to(...)
+ end
+
+ def track_subscription
+ # ...
+ end
+end
+
+ Ruby on Rails 7.1.3
@@ -86,7 +86,12 @@
-
+ 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?
+
@@ -105,12 +110,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
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
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-
# File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 58
def after_subscribe(*methods, &block)
set_callback(:subscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -144,12 +149,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 67
def after_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,12 +184,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 45
def before_subscribe(*methods, &block)
set_callback(:subscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -214,12 +219,12 @@
📝 Source code
- # File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+ # File actioncable/lib/action_cable/channel/callbacks.rb, line 63
def before_unsubscribe(*methods, &block)
set_callback(:unsubscribe, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html
index b755f8750f..93d9cc96d9 100644
--- a/src/classes/ActionCable/Channel/ChannelStub.html
+++ b/src/classes/ActionCable/Channel/ChannelStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -118,7 +118,7 @@
subscription_confirmation_sent?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -153,7 +153,7 @@
subscription_rejected?
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -190,7 +190,7 @@
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
def start_periodic_timers; end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -225,7 +225,7 @@
@_streams = []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
streams << broadcasting
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -320,7 +320,7 @@
@_streams ||= []
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html
index 183e18e756..87478b8c0c 100644
--- a/src/classes/ActionCable/Channel/ConnectionStub.html
+++ b/src/classes/ActionCable/Channel/ConnectionStub.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -154,7 +154,7 @@
@logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -193,7 +193,7 @@
@connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -228,7 +228,7 @@
transmissions << cable_message.with_indifferent_access
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html
index 3f106052e3..7a89bdf383 100644
--- a/src/classes/ActionCable/Channel/Naming.html
+++ b/src/classes/ActionCable/Channel/Naming.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
index a54e7e6618..804bdaf791 100644
--- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -91,7 +91,7 @@
@channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
index ee02b18833..a87939b466 100644
--- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html
+++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers.html b/src/classes/ActionCable/Channel/PeriodicTimers.html
index c9b54b63e9..5854ca0634 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
index 6e7ec734c9..657d1ef3a2 100644
--- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -114,7 +114,7 @@
self.periodic_timers += [[ callback, every: every ]]
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html
index a37759a2b7..3e48f85e5b 100644
--- a/src/classes/ActionCable/Channel/Streams.html
+++ b/src/classes/ActionCable/Channel/Streams.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -174,7 +174,7 @@
end.clear
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -209,7 +209,7 @@
stop_stream_from(broadcasting_for(model))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -248,7 +248,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -285,7 +285,7 @@
stream_from(broadcasting_for(model), callback || block, coder: coder)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -335,7 +335,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -374,7 +374,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase.html b/src/classes/ActionCable/Channel/TestCase.html
index 17de04225a..5c65247192 100644
--- a/src/classes/ActionCable/Channel/TestCase.html
+++ b/src/classes/ActionCable/Channel/TestCase.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html
index b8f7230dac..7d7e69d1a9 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -192,7 +192,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -227,7 +227,7 @@
super(broadcasting_for(stream_or_object), *args)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -268,7 +268,7 @@
assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -309,7 +309,7 @@
assert_has_stream(broadcasting_for(object))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -350,7 +350,7 @@
assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -388,7 +388,7 @@
subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -430,7 +430,7 @@
@connection = ConnectionStub.new(identifiers)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -469,7 +469,7 @@
@subscription
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -505,7 +505,7 @@
connection.transmissions.filter_map { |data| data["message"] }
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -541,7 +541,7 @@
subscription.unsubscribe_from_channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
index c3644a7257..8d9eb0efb7 100644
--- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
+++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -98,7 +98,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -137,7 +137,7 @@
channel
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -179,7 +179,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection.html b/src/classes/ActionCable/Connection.html
index c2fd04e240..e37fd884d9 100644
--- a/src/classes/ActionCable/Connection.html
+++ b/src/classes/ActionCable/Connection.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html
index 979156a3dc..1234a86714 100644
--- a/src/classes/ActionCable/Connection/Assertions.html
+++ b/src/classes/ActionCable/Connection/Assertions.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -90,7 +90,7 @@
assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html
index d3cebd019e..20a6123943 100644
--- a/src/classes/ActionCable/Connection/Authorization.html
+++ b/src/classes/ActionCable/Connection/Authorization.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -102,7 +102,7 @@
raise UnauthorizedError
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
index afada21598..960919203c 100644
--- a/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
+++ b/src/classes/ActionCable/Connection/Authorization/UnauthorizedError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html
index 19ffcaf9f7..b9628f0dc7 100644
--- a/src/classes/ActionCable/Connection/Base.html
+++ b/src/classes/ActionCable/Connection/Base.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -269,7 +269,7 @@
@started_at = Time.now
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -308,7 +308,7 @@
transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -348,7 +348,7 @@
websocket.close
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -385,7 +385,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -420,7 +420,7 @@
worker_pool.async_invoke(self, method, *arguments)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -460,7 +460,7 @@
}
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -498,7 +498,7 @@
request.cookie_jar
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -536,7 +536,7 @@
end
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Callbacks.html b/src/classes/ActionCable/Connection/Callbacks.html
index f70a8c424e..39b8970d26 100644
--- a/src/classes/ActionCable/Connection/Callbacks.html
+++ b/src/classes/ActionCable/Connection/Callbacks.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -25,7 +25,9 @@
Action Cable Connection Callbacks
-
There are before_command
, after_command
, and around_command
callbacks available to be invoked before, after or around every command received by a client respectively. The term “command” here refers to any interaction received by a client (subscribing, unsubscribing or performing actions):
+The before_command, after_command, and around_command callbacks are invoked when sending commands to the client, such as when subscribing, unsubscribing, or performing an action.
+
+Example
module ApplicationCable
class Connection < ActionCable::Connection::Base
diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
index 1f42774dce..22aa650bda 100644
--- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,12 +89,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
def after_command(*methods, &block)
set_callback(:command, :after, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -124,12 +124,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 49
def around_command(*methods, &block)
set_callback(:command, :around, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -159,12 +159,12 @@
📝 Source code
- # File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+ # File actioncable/lib/action_cable/connection/callbacks.rb, line 41
def before_command(*methods, &block)
set_callback(:command, :before, *methods, &block)
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html
index 7c5ce5959d..030b3e569a 100644
--- a/src/classes/ActionCable/Connection/Identification.html
+++ b/src/classes/ActionCable/Connection/Identification.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -103,7 +103,7 @@
@connection_identifier
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
index 89d0a7b70d..36348ac48c 100644
--- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html
+++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
@@ -89,7 +89,7 @@
self.identifiers += identifiers
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/InternalChannel.html b/src/classes/ActionCable/Connection/InternalChannel.html
index 02f15cdacc..62b4b07390 100644
--- a/src/classes/ActionCable/Connection/InternalChannel.html
+++ b/src/classes/ActionCable/Connection/InternalChannel.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Module
diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
index 1bbc4bb99d..bf24314dc2 100644
--- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
+++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -93,7 +93,7 @@
"test case definition."
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html
index fa529c3654..e55fecf96d 100644
--- a/src/classes/ActionCable/Connection/StreamEventLoop.html
+++ b/src/classes/ActionCable/Connection/StreamEventLoop.html
@@ -5,7 +5,7 @@
- Ruby on Rails 7.1.0
+ Ruby on Rails 7.1.3
Class
@@ -120,7 +120,7 @@
@spawn_mutex = Mutex.new
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -163,7 +163,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -203,7 +203,7 @@
wakeup
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -241,7 +241,7 @@
@executor << task
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -277,7 +277,7 @@
wakeup if @nio
end
- 🔎 See on GitHub
+ 🔎 See on GitHub
@@ -312,7 +312,7 @@
Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
end
-