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 <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-04-19 09:15:59 +09:00
parent 56452b211b
commit 79777eed9e

View File

@ -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