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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Does nobody has any ideas ? On 25 Jun., 15:46, Christoph <chrisi.dibi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 26 Jun 2008, at 11:02, Christoph wrote:> > Does nobody has any ideas ? > > On 25 Jun., 15:46, Christoph <chrisi.dibi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> 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>> Thank you very much in advance, >> Christoph > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On 26 Jun., 12:09, Thorsten Müller <thors...-1oxKqHKwyltBDgjK7y7TUQ@public.gmane.org> wrote:> 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 26 Jun 2008, at 13:12, Christoph wrote:> 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 ?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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---