Symfony like "forward404"

Hi community,
as I'm a previous PHP and especially symfony programmer, I often try
to find features of symfony in rails. Now I'm looking for a method
which forwards to a 404 error page (but with stack trace and so on in
development mode). I tried to manually render public/404.html, but if
I do so, I miss the stack trace. Is there a method like this or are
rails programmers using a different approach to show a 404 error ? I
hope you understand my problem and help me solving it !

Thank you very much in advance,
Christoph

Does nobody has any ideas ?

Does nobody has any ideas ?

Hi community,
as I'm a previous PHP and especially symfony programmer, I often try
to find features of symfony in rails. Now I'm looking for a method
which forwards to a 404 error page (but with stack trace and so on in
development mode). I tried to manually render public/404.html, but if
I do so, I miss the stack trace. Is there a method like this or are
rails programmers using a different approach to show a 404 error ? I
hope you understand my problem and help me solving it !

In dev mode (or in production mode if you ask for it) if you don't
handle an exception you'll get a stack trace etc... Is that what
you're looking for?

Fred

I don't think anybody used it this way, since there
is not much reason to do it. I won't show a stack trace
to my users in production, because that's not their business
and in development I get the debug info I need from
development.log or the server output.

Maybe you don't understand my question: I'm searching for a
possibility to show a 404 error page, something like this code:
redirect_to_404 unless request.xhr?
Is there a method like redirect_to_404, or are rails developers using
a different approach ?

Christoph

render :file => “#{RAILS_ROOT}/public/404.html”, :status => 404 and return

As weird as it may sound, there’s a whole section in the API that talks about this:

http://api.rubyonrails.com/classes/ActionController/Base.html#M000852

Best regards

Peter De Berdt