omg...thank you so much for enlightenment :) would have driven me crazy thank you so much
Jan Am Sonntag, den 10.04.2011, 23:58 -0700 schrieb Frederick Cheung: > > On Apr 10, 5:59 pm, jan <[email protected]> wrote: > > Hi, > > the following piece code has been troubling me for a couple of days > > now: > > > > <% render :file => "../../public/images/projects/" + @project + "/ > > project.html" %> > > <% never outputs anything. You want <%= instead. > > Fred > > > > 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 > > (http://stackoverflow.com/questions/5572098/rails-render-doesnt-do-anything) > > > > i hope you guys will have a suggestion...thanks allready > > jan > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

