Module: Hibiki::Rails::Channel::ClassMethods
- Defined in:
- lib/hibiki/rails/channel.rb
Constant Summary collapse
- HIDDEN_ACTIONS =
Lifecycle hooks, never client-invocable actions. Performing "build_graph" would rebuild the graph and leak the old root; "subscribed" would build a SECOND graph actor on the connection.
These need subtracting because ActionCable computes action_methods as "public methods this class adds": #subscribed and #unsubscribed are private on its base class, so they are never subtracted for free, and a public app-side override — the shape the ActiveRecord guide's after_commit bridge invites — is added straight back by public_instance_methods(false).
%w[build_graph subscribed unsubscribed].freeze
Instance Method Summary collapse
-
#action_methods ⇒ Object
Subtracted here rather than through ActionCable's #internal_methods hook, which only exists on 8.x: on Rails 7.1 and 7.2 that hook is never consulted, so an override of it is silently dead code.
Instance Method Details
#action_methods ⇒ Object
Subtracted here rather than through ActionCable's #internal_methods hook, which only exists on 8.x: on Rails 7.1 and 7.2 that hook is never consulted, so an override of it is silently dead code. This works on every supported version.
55 |
# File 'lib/hibiki/rails/channel.rb', line 55 def action_methods = super - HIDDEN_ACTIONS |