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
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.
uses respond_to?(:call) to check if aws_attributes is proc which is broken in this case. I suggest checking it using is_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.
The text was updated successfully, but these errors were encountered:
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
carrierwave-aws/lib/carrierwave/storage/aws_options.rb
Line 46 in 09c5baa
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.The text was updated successfully, but these errors were encountered: