Forum: Ruby on Rails render_file works, render :file doesn't

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joe (Guest)
on 2006-05-26 23:01
I have these two bits of code:

<%= render_file  @item.path, false %>
<%= render :file => @item.path, :layout => false %>

The first line works, the second doesn't (results in a blank page -
nothing in the logs either). Any idea what the problem is?

Joe
Joe (Guest)
on 2006-05-26 23:30
Joe wrote:
>
> <%= render_file  @item.path, false %>

Changing this to below causes it not to work. WTF?

<%= render_file  @item.path %>

Joe
This topic is locked and can not be replied to.