|
What we're listening to:
|
renaming files on upload with paperclipOctober 15th, 2009I hadn’t done this before and everywhere I googled suggested using a custom interpolation to replace :basename in the default :path and :url params to has_attached_file The problem with this is 1. the actual image_file_name column in the database doesn’t get replaced 2 whatever you put in your interpolation function gets run every time the image url gets generated. The answer is just rename the image_file_name before the model gets saved. |