Fix redirect_to :back deprecation warning

This commit is contained in:
Julian Herrero
2019-03-29 16:21:20 +01:00
parent e7f39bc454
commit fb81f45a73
2 changed files with 3 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ class Admin::Poll::Questions::Answers::VideosController < Admin::Poll::BaseContr
else
t("flash.actions.destroy.error")
end
redirect_to :back, notice: notice
redirect_back(fallback_location: (request.referrer || root_path), notice: notice)
end
private