How can I hide/catch the "Camping problem! /xxx not found" pages? It would be great to define my own handler instead, or simply redirect to the root of my app. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20111013/ba7145ee/attachment.html>
module MyApp def r404(path) "404: #{path}" # or you can render a template: render :four_oh_four end end There''s also r500(klass,method,exception) which gets called when an exception happens, and r501(method) which gets called when a route is found, but the controller doesn''t have the method. // Magnus Holm On Thu, Oct 13, 2011 at 21:25, Nokan Emiro <uzleepito at gmail.com> wrote:> How can I hide/catch the "Camping problem! /xxx not found" pages? > It would be great to define my own handler instead, or simply > redirect to the root of my app. > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >
Check out Error handling down the bottom of this page: http://camping.rubyforge.org/book/51_upgrading.html ? Jenna On 14/10/2011, at 6:25 AM, Nokan Emiro wrote:> How can I hide/catch the "Camping problem! /xxx not found" pages? > It would be great to define my own handler instead, or simply > redirect to the root of my app. > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20111014/c76684c3/attachment.html>