Rescue_action in Rails 1.2.x not rendering my render

Hi,

I am running Rails 1.2.6 and cannot get rescue)action to work like in
the docs.

class ApplicationController < …
def rescue_action(exception)
puts "Bad JuJu2 >>>#{exception.to_s}<<<"yout =>
‘rescues/layout.erb’)
# body = ‘More JuJu’
render :partial => “error_404”, :layout => true,
:status => “404 Error”
end

end

Anyway, when I cause a routing error, it calls this action, but
renders the default 500.html page and not my error_404 partial.

The output from ./script/server is:
Bad JuJu2 >>>no route found to match “/q/4IGP” with {:method=>:get}<<<
127.0.0.1 - - [27/Jun/2011:22:34:42 EDT] “GET /q/4IGP HTTP/1.1” 500 316

  • → /q/4IGP

Anyone no what I am doing wrong? Is this a bug or feature of 1.2.6?

I’d like to create a more pleasant error page.

TIA

Cheers,
Ed

Ed Howland

http://twitter.com/ed_howland

On Jun 27, 2011, at 19:41 , Ed Howland wrote:

I am running Rails 1.2.6 and cannot get rescue)action to work like in the docs.

Please take this to the ruby-on-rails list/forum.