Hi, the following piece code has been troubling me for a couple of days now:
<% render :file => "../../public/images/projects/" + @project + "/ project.html" %>
it is in the index.html.erb file of a controller. I know that is not really the intended use of the render function but for project specific reasons i would like to do it like that. the integrated dev webserver returns the following message:
Rendered public/images/projects/Jonas/_project.html (0.4ms)
so i assume the render was sucessfull but the problem is the html that was supposed to be rendered is not in the resulting html file. it is as if the render statement wasn't there. just to be sure I tried another way as well. because render file => expects a file with an absolute path i did the following
<% file = File.open("public/images/projects/" + @project + "/ project.html") %> <% render :inline => File.expand_path(file.path) %>
again the server reports sucess but there is nothing...at least not what is supposed to be there. So i have no idea what else to do. i could not find any answer in this mailinglist or via stackoverflow (Newest Questions - Stack Overflow 5572098/rails-render-doesnt-do-anything)
i hope you guys will have a suggestion...thanks allready jan