【发布时间】:2012-08-24 05:03:36
【问题描述】:
您好,我在生成 pdf 时保存图像后使用 wicked_pdf 生成图像,并使用此标签显示这样的图像
<%= wicked_pdf_image_tag(@image.snap.url(:original)) unless @image.blank? %>
它给了我这个未知的错误
ActionView::Template::Error (undefined method `pathname' for nil:NilClass):
而 puts @image.inspect 在下面给我正确的路径
"/system/snaps/7/original/flake.jpg"
谁能帮忙
谢谢....
【问题讨论】:
-
我尚未验证,但我怀疑它的目的是处理 /assets/images 中的图像而不是 /public 中的文件