Redirect :back deprecated. updating follows controller

This commit is contained in:
Brenda Wallace
2018-04-02 16:28:34 +12:00
parent 59cca1b8cb
commit af0c9a490b

View File

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