Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

render :file not working quite right

#3944

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).

Reported by Jeremy McAnally · February 13th, 2010 @ 01:12 AM

State: resolved
Milestone: 3.0.2
Assigned to: Yehuda Katz (wycats) Yehuda Katz (wycats)
Importance: none

Activity

  1. Pratik
    Pratik
    • Assigned user set to Yehuda Katz (wycats)
    • Milestone cleared.

    February 13th, 2010 @ 01:20 AM

  2. Yehuda Katz (wycats)
    Yehuda Katz (wycats)

    Is this in ActionController or in a view?

    February 24th, 2010 @ 05:44 AM

  3. Jeremy McAnally
  4. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • State changed from new to resolved

    Fixed in ae933a093db93c22b9facd3411afd9ef69719193

    February 24th, 2010 @ 06:46 AM

  5. Jeremy Kemper