Open scarhand opened 2 years ago
@scarhand Looks like ActiveSupport.on_load(:action_cable_channel)
wasn't added until Rails 6, which is the cause for the failures on Rails 5.2.
Rails 5.2 is EOL on June 1st, 2022, so we can't really drop support for it yet I feel like.
Maybe we can do a different method for Rails 5, like a config.to_prepare
block or something?
Looks like the PR is about a month too early then ;)
I'll see if config.to_prepare
can be used, or if there's something else that works with Rails 5(.2).
If there's nothing easy, we can wait on Rails 5.2 to be EOL and update the required versions here soon.
@excid3 Rails 5.2 is now EOL. Is this PR now possible to merge?
Or does it need to work with class Connection < ActionCable::Connection::Base
now?
Allows you to use
set_current_tenant_through_filter
,set_current_tenant_by_subdomain_or_domain
andset_current_tenant_by_subdomain
in ActionCable channels, in a similar vein as ActionControllers.E.g.:
Haven't made any changes to the README, as I wasn't sure where to put it :)