mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-03-25 08:55:47 +00:00
for rails < 6.0.0 still use ActionDispatch::Http::ParameterFilter
This commit is contained in:
parent
3eef054935
commit
4bced793a9
1 changed files with 11 additions and 3 deletions
|
|
@ -1,9 +1,17 @@
|
|||
if defined?(::Rails.application)
|
||||
if Gem::Version.new(Rails.version) < Gem::Version.new('6.0.0')
|
||||
class ParameterFilter < ActionDispatch::Http::ParameterFilter
|
||||
def initialize(_replacement, filter_parameters)
|
||||
super(filter_parameters)
|
||||
end
|
||||
end
|
||||
else
|
||||
class ParameterFilter < ActiveSupport::ParameterFilter
|
||||
def initialize(_replacement, filter_parameters)
|
||||
super(filter_parameters)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
#
|
||||
# lifted from https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/http/parameter_filter.rb
|
||||
|
|
|
|||
Loading…
Reference in a new issue