0

Is there an acceptable way to have Paperclip not make a network request each time you call model.attachment.url()?

I'd like to cache the URLs for faster load speeds / being able to load my development environment, without needing connected wifi, etc.

Jordan Warbelow-Feldstein
  • 10,510
  • 12
  • 48
  • 79

1 Answers1

5

If you are using the fog provider, it appears that you should be able use Paperclip::Attachment.default_options[:fog_host] = "http://myhost.com" in your paperclip initializer to specify your host. This should reduce the look up calls.

Kyle Rames
  • 398
  • 2
  • 5