Closed gosukiwi closed 6 years ago
To support Rails 5.1, also replace
render text: nil, status: -1
with
render plain: nil, status: -1
Good catch @OlegSmelov 👍 Done
It'd be great to see this get merged!
In the meantime, I don't use Tubesock::Hijack
and instead define in my Controller:
private
def hijack
sock = Tubesock.hijack(request.env)
yield sock
sock.onclose { ActiveRecord::Base.clear_active_connections! if defined?(ActiveRecord) }
sock.listen
render plain: nil, status: -1
end
If we can get the tests green I'm happy to merge it.
env
is deprecated in Ralis 5.0 and removed in 5.1, this updates the code to userequest.env
instead: https://github.com/rails/rails/issues/23294