This project is archived and is in readonly mode.

#3944 ✓resolved
Jeremy McAnally

render :file not working quite right

Reported by Jeremy McAnally | February 13th, 2010 @ 01:12 AM | in 3.0.2

If I have code like this:

render :file => "#{Rails.root}/public/404.html", :status => :not_found

It will not find the file and render it; it will instead raise an error like so:

ActionView::MissingTemplate: Missing template /404.html with {:formats=>[:html]} in view path /Users/jeremymcanally/code/... {tons of paths here} ...

It seems that either this behavior should be restored or perhaps public should be added to the view paths (so I would just have to do render :file => "404.html" or something). I don't know the right solution; I just know that it doesn't behave like it used (since this code was working previously and still works on 2.3).

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages