Upload path based on a record value for Carrier wave Direct
问题 I want to configure an upload path for Carrier wave Direct,which I am using to upload files directly to Amazon s3.In app/uploaders/myuploader.rb ,I have, def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end I want to modify this so that,the path looks like, "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{User.name}". so it will be some thing like, "uploads/Users/avatar/michael_jordan/.." Where User is the model in which the uploader is mounted. I have