Closed BrianHawley closed 1 year ago
Thanks for the PR. Where's the fix for this point?
The initialize_dup is defined in the wrong context, as it refers to the overall mounters collection for the object, but is defined in a per-mounter module.
https://github.com/carrierwaveuploader/carrierwave/issues/1962#issuecomment-1370308875
@mshibuya I've used this fix in my app at work (to fix after updating carrierwave yesterday) and it solves the issues I ran into: NoMethodError on nil, fortunately caught by our test suite. I verified it there before making the PR here.
If we were to solve the 'wrong context' issue, the change will look like this. What do you think?
Sure, that will work. Updated with your changes, @mshibuya.
Thank you!
each
if@_mounters
is unitialized or nil. It will be nil for calls to later mounters, or if not referenced or saved.column
when it should be a local variable.[Fixes #1962]