I want to save photographs in 'grid_fs' and other types of files into 'fog', like:
class DocumentUploader < CarrierWave::Uploader::Base
def storage
if model.is_photograph == true
:grid_fs
else
:fog
end
end
end
Is this possible?
I want to dynamically assign the storage type from model attributes, and I've tried this, but the model and its attributes are not accessible in a class method.
Thanks!