method

stream_or_reject_for

rails latest stable - Class: ActionCable::Channel::Streams
stream_or_reject_for(model)
public

Calls stream_for with the given model if it’s present to start streaming, otherwise rejects the subscription.