A common way to load CarrierWave config is from yml file using Rails.application.config_for method. This method returns object of class ActiveSupport::OrderedOptions which behaves similar to OpenStruct but responds to .call and returns nil for .call.
Hello.
A common way to load CarrierWave config is from yml file using
Rails.application.config_for
method. This method returns object of classActiveSupport::OrderedOptions
which behaves similar to OpenStruct but responds to.call
and returnsnil
for.call
.This line https://github.com/carrierwaveuploader/carrierwave-aws/blob/09c5baa6f7bf478f421467d5babefd4499ba72a5/lib/carrierwave/storage/aws_options.rb#L46 uses
respond_to?(:call)
to check ifaws_attributes
is proc which is broken in this case. I suggest checking it usingis_a?(Proc)
which will be more correct. On the other side it will break the "duck type" approach, so not sure what's the right solution here.