rails 5: replace redirect_to :back with redirect_back

ref: https://blog.bigbinary.com/2016/02/29/rails-5-improves-redirect_to_back-with-redirect-back.html
This commit is contained in:
evazion
2018-04-28 12:24:36 -05:00
parent 36f15daa49
commit 6b4a345378
2 changed files with 2 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ class WikiPageVersionsController < ApplicationController
def diff
if params[:thispage].blank? || params[:otherpage].blank?
redirect_to :back, :notice => "You must select two versions to diff"
redirect_back fallback_location: wiki_pages_path, notice: "You must select two versions to diff"
return
end