Lighthouse has a new layout.
Prefer the old one? Return to the old layout,
and switch back any time from the link at the top of each page.
This project is archived and is in readonly mode.
Symbol duplication error in ParameterFilter compiled_filter
#6557
I'm using Rails 3.0.3, and I'm having a problem with passing a
block to filter_parameters in application.rb. If I pass a block, an
error occurs on line 38 of
ActionDispatch::Http::ParameterFilter.compiled_filter:
key = key.dup
when key is a symbol. This happens because symbols are not
duplicable. Here is the source:
def compiled_filter
...
elsif blocks.present?
key = key.dup
value = value.dup if value.duplicable?
blocks.each { |b| b.call(key, value) }
end
...
end
I'm not sure why there isn't a duplicable? check on key before
dup is called, but if I add that my problem is resolved. I'm
wondering if that is a safe change to make. I am worried that the
original author left that out intentionally.
The symbol that causes the error is :action, and it occurs
whenever an error-email is being processed (using the
exception-notifier gem).