instance method
stream_or_reject_for
Ruby on Rails 8.1.2
Since v6.1.7.10Signature
stream_or_reject_for(model)
Calls stream_for with the given model if it’s present to start streaming, otherwise rejects the subscription.
Parameters
-
modelreq
Source
# File actioncable/lib/action_cable/channel/streams.rb, line 146
def stream_or_reject_for(model)
if model
stream_for model
else
reject
end
end
Defined in actioncable/lib/action_cable/channel/streams.rb line 146
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Channel::Streams