You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the mimemagic incident we were forced to quickly update carrierwave and were thus confronted with the whitelist/blacklist deprecation change from 2.2.
However the way the deprecation is implemented with respond_to? only works as a deprecation if you were already using the white/blacklist methods directly in your application. This doesn't work as a deprecation if another gem is depending on the existence of those methods.
We are using carrierwave_direct which still uses those old methods while certain models within our application aren't defining any whitelists resulting in undefined method 'extension_whitelist' errors. It took me a while to figure out the problem as the change is marked as a deprecation.
The quickfix/solution for us for now was putting in empty methods on our models that include CarrierWaveDirect::Uploader so that the respond_to is satisfied and we can make use of the deprecation-functionality;
def extension_whitelist
end
I'm posting this as some feedback towards the change and to help others understand the problem as I assume we're not the only ones forced to suddenly update gems due to the mimemagic incident.
The text was updated successfully, but these errors were encountered:
Hi @bastianwegge, the issue I raised concerns the whitelist/blacklist deprecation from 2.2, which hasn't been changed since then, so this new release does not change anything in regard to this issue. I'll change my initial message a bit to remove some irrelevant info to avoid this confusion.
Due to the mimemagic incident we were forced to quickly update carrierwave and were thus confronted with the
whitelist/blacklist
deprecation change from 2.2.However the way the deprecation is implemented with
respond_to?
only works as a deprecation if you were already using the white/blacklist methods directly in your application. This doesn't work as a deprecation if another gem is depending on the existence of those methods.We are using carrierwave_direct which still uses those old methods while certain models within our application aren't defining any whitelists resulting in
undefined method 'extension_whitelist'
errors. It took me a while to figure out the problem as the change is marked as a deprecation.The quickfix/solution for us for now was putting in empty methods on our models that include
CarrierWaveDirect::Uploader
so that the respond_to is satisfied and we can make use of the deprecation-functionality;I'm posting this as some feedback towards the change and to help others understand the problem as I assume we're not the only ones forced to suddenly update gems due to the mimemagic incident.
The text was updated successfully, but these errors were encountered: