mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-10 16:54:38 -04:00
Merge pull request #4533 from Growstuff/Rails/RedirectBackOrTo
Rubocop: Rails/RedirectBackOrTo
This commit is contained in:
@@ -676,12 +676,6 @@ Rails/RakeEnvironment:
|
||||
- 'lib/tasks/i18n.rake'
|
||||
- 'lib/tasks/testing.rake'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Rails/RedirectBackOrTo:
|
||||
Exclude:
|
||||
- 'app/controllers/follows_controller.rb'
|
||||
|
||||
# Offense count: 9
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: AllowedReceivers.
|
||||
|
||||
@@ -17,7 +17,7 @@ class FollowsController < ApplicationController
|
||||
else
|
||||
flash[:error] = "Already following or error while following."
|
||||
end
|
||||
redirect_back fallback_location: root_path
|
||||
redirect_back_or_to(root_path)
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
Reference in New Issue
Block a user