I cant figure out how to update/rename a file uploaded/managed with Carrierwave-mongoid in rails 3.2.6. I want to rename the file in the db as well as on the filesystem.
Based on @user892583, I worked on it and came up with a simpler solution:
def rename!(new_name) new_path = File.join(File.dirname(file.file), new_name) file.move_to(new_path) end