What we're listening to:
Jared

The Hold Steady:
Heaven Is Whenever
Jeff

Paper Route:
Absence

I 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.

blog comments powered by Disqus