summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-07-27 13:43:29 -0600
committerConnor Shea <connor.james.shea@gmail.com>2016-07-27 13:56:30 -0600
commitb1c94754436e4c15529276a61d601f72bb53c2b2 (patch)
tree8744ba1756373082b701cfaca07f5563cb9265d0
parentf6063baed4e19eed2c1dd7549ede0692f3250df8 (diff)
downloadgitlab-ce-rename-undefined-methods.tar.gz
Replace reject_blocked with reject_blocked! in callbacks.rename-undefined-methods
In Rails 4.2 and below, skipping callbacks (skip_before_action, skip_after_action, etc.) that use methods which do not exist will not throw any errors. On the other hand, Rails 5 does. See https://github.com/rails/rails/pull/19029 After testing with Rails 5 I noticed there are some methods that don't actually exist (because they were renamed, usually), this fixes a few instances of those. reject_blocked! was introduced in c9def945d4222eeb8026a0311495259bf99267a1, I can't find any references to reject_blocked ever existing.
-rw-r--r--app/controllers/explore/application_controller.rb2
-rw-r--r--app/controllers/help_controller.rb2
-rw-r--r--app/controllers/search_controller.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/explore/application_controller.rb b/app/controllers/explore/application_controller.rb
index 461fc059a3c..a1ab8b99048 100644
--- a/app/controllers/explore/application_controller.rb
+++ b/app/controllers/explore/application_controller.rb
@@ -1,5 +1,5 @@
class Explore::ApplicationController < ApplicationController
- skip_before_action :authenticate_user!, :reject_blocked
+ skip_before_action :authenticate_user!, :reject_blocked!
layout 'explore'
end
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index f7b44099b78..4eca278599f 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -1,5 +1,5 @@
class HelpController < ApplicationController
- skip_before_action :authenticate_user!, :reject_blocked
+ skip_before_action :authenticate_user!, :reject_blocked!
layout 'help'
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index 69c92d2bed2..61517d21f9f 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -1,5 +1,5 @@
class SearchController < ApplicationController
- skip_before_action :authenticate_user!, :reject_blocked
+ skip_before_action :authenticate_user!, :reject_blocked!
include SearchHelper