From af0c9a490b3ea58d41fcdbb29964c6df40fbd6eb Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 2 Apr 2018 16:28:34 +1200 Subject: [PATCH] Redirect :back deprecated. updating follows controller --- app/controllers/follows_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/follows_controller.rb b/app/controllers/follows_controller.rb index 2c4b2daab..b97eb9e2b 100644 --- a/app/controllers/follows_controller.rb +++ b/app/controllers/follows_controller.rb @@ -9,10 +9,10 @@ class FollowsController < ApplicationController if @follow.save flash[:notice] = "Followed #{@follow.followed.login_name}" - redirect_to :back + redirect_back fallback_location: root_path else flash[:error] = "Already following or error while following." - redirect_to :back + redirect_back fallback_location: root_path end end