controllers: declare search_params helper in app controller.

This commit is contained in:
evazion
2020-03-31 17:53:50 -05:00
parent 9def8c5c0d
commit 81488c7608
3 changed files with 1 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
class ApplicationController < ActionController::Base
include Pundit
helper_method :search_params
class ApiLimitError < StandardError; end

View File

@@ -1,6 +1,5 @@
class BansController < ApplicationController
respond_to :html, :xml, :json
helper_method :search_params
def new
@ban = authorize Ban.new(permitted_attributes(Ban))

View File

@@ -24,10 +24,4 @@ class IpBansController < ApplicationController
@ip_ban.destroy
respond_with(@ip_ban)
end
private
def search_params
params.fetch(:search, {}).permit(%i[ip_addr order])
end
end