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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and 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 (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 %>

This topic is locked and can not be replied to.