开发者

Can't render an HTML within a Rails 3 view

I'm trying to display an html file that is uploaded with Carrierwave with:

<%= render :file => "#{@result.result_url}"  %>

But I get Missing template /results/100602f010.htm

I've tried :template => fa开发者_运维百科lse, but that doesn't work either. Any ideas?


render :file => "foo" expects an absolute path by default, so unless you really have a root directory in your file system called /results your path is incomplete.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜