mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 14:58:05 -05:00
24 lines
508 B
Ruby
24 lines
508 B
Ruby
# frozen_string_literal: true
|
|
|
|
class StreamingController < ApplicationController
|
|
include ActionController::Live
|
|
|
|
before_action :authenticate_user!
|
|
|
|
def index
|
|
render body: 'Index'
|
|
end
|
|
|
|
# Work around https://github.com/heartcombo/devise/issues/2332, which affects
|
|
# tests in Rails 4.x (and affects production in Rails >= 5)
|
|
def process(name)
|
|
super(name)
|
|
rescue ArgumentError => e
|
|
if e.message == 'uncaught throw :warden'
|
|
throw :warden
|
|
else
|
|
raise e
|
|
end
|
|
end
|
|
end
|