how to renaming uploaded files with Carrierwave in ActiveAdmin?
I'm using the ActiveAdmin to manage my data. Also, I use Carrierwave to
upload file. I want to rename the file when I upload the file, so I
override the filename function in uploaders/file_uploader.rb.
def filename
model.id ? "#{model.id}-#{original_filename}" : original_filename
end
But when I login the ActiveAdmin to upload a file, it just does'n work.
What should I do to rename the filename in ActiveAdmin when I use the
Carrierwave?
No comments:
Post a Comment