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.
精彩评论