From 79777eed9e7b28de288f8e15acf32d06d53aed59 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Thu, 19 Apr 2018 09:15:59 +0900 Subject: [PATCH] Use redirect_back to suppress deprecation warning > DEPRECATION WARNING: `redirect_to :back` is deprecated and will be > removed from Rails 5.1. Please use `redirect_back(fallback_location: > fallback_location)` where `fallback_location` represents the location > to use if the request has no HTTP referer information. Signed-off-by: Kenji Okimoto --- app/controllers/concerns/setting_history_concern.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/setting_history_concern.rb b/app/controllers/concerns/setting_history_concern.rb index 12accf3..72c43af 100644 --- a/app/controllers/concerns/setting_history_concern.rb +++ b/app/controllers/concerns/setting_history_concern.rb @@ -28,7 +28,7 @@ module SettingHistoryConcern else flash = { danger: @fluentd.agent.log.tail(1).first } end - redirect_to :back, flash: flash + redirect_back fallback_location: root_url, flash: flash end end