Fix Sorcery conflict for redirect_back_or_to
See https://github.com/Sorcery/sorcery/issues/296
This commit is contained in:

committed by
Sebastian Serth

parent
c280a58214
commit
7a1330323c
@ -21,7 +21,7 @@ class LiveStreamsController < ApplicationController
|
||||
# Using the submission ID parameter would allow looking up the corresponding exercise ID
|
||||
# Therefore, we just redirect to the root_path, but actually expect to redirect back (that should work!)
|
||||
skip_authorization
|
||||
redirect_back(fallback_location: root_path, allow_other_host: true, alert: t('exercises.download_file_tree.gone'))
|
||||
redirect_back_or_to(root_path, allow_other_host: true, alert: t('exercises.download_file_tree.gone'))
|
||||
else
|
||||
desired_file = params[:filename].to_s
|
||||
runner = Runner.for(current_contributor, @submission.exercise.execution_environment)
|
||||
@ -65,7 +65,7 @@ class LiveStreamsController < ApplicationController
|
||||
end
|
||||
end
|
||||
rescue Runner::Error
|
||||
redirect_back(fallback_location: redirect_fallback, alert: t('exercises.download_file_tree.gone'))
|
||||
redirect_back_or_to(redirect_fallback, alert: t('exercises.download_file_tree.gone'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user