开发者

Can't render an HTML within a Rails 3 view

开发者 https://www.devze.com 2023-02-02 17:33 出处:网络
I\'m trying to display an html file that is uploaded with Carrierwave with: <%= render :file => \"#{@result.result_url}\"%>

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

精彩评论

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