Dynamic use of :default_url in Paperclip

前端 未结 4 1436
灰色年华
灰色年华 2020-12-16 17:31

I\'m trying to configure Paperclip to provide different missing images based on the instance\'s category attribute. Every category of the object has its own missing image.

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-16 18:09

    There is a nice clean solution on the paperclip wiki now for :url, :path, and :default_url which works a teat.

    https://github.com/thoughtbot/paperclip/wiki/Interpolations

提交回复
热议问题