In my controller I’m trying to do something like:
uploader = object[params[:attribute]]
uploader.retrieve_from_store!(params[:file])
uploader.cache_stored_file!
send_file uploader.file.path
But the problem is that object[params[:attribute]] is returning a String(the DB record with the filename), not my carrierwave object (I already checked that object.attribute is returning the uploader, it works). How can I get the uploader or maybe how can I initialize it?
Thanks in advance
If somebody crosses with the same problem, I did it with: