title: How to rewrite Rails assets path?
body: <p>I began moving all the assets in my site to S3 and ran into a problem with my asset path.
  There's a WYSIWYG editor on my site that includes images by absolute path, so when you add an image, it doesn't use the rails image_tag helper but rather adds an image like this:</p>
  
  <pre><code>&lt;img src="/system/images/image_1.jpg" /&gt;
  </code></pre>
  
  <p>The problem is that in production the URL <code>/system/images/image_1.jpg</code> leads to a non-existant file.</p>
  
  <p>Naturally, two solutions are to 1) replace the URL dynamically (gsub) when it's called and 2) to loop through the database and replace the urls.</p>
  
  <p>A better solution, however, would be to rewrite the <code>/system/images/image_1.jpg</code> url to point to S3. How do I do that?</p>
  
  <p>Thanks!</p>