How can I catch the ActionView::MissingTemplate errors in Rails?
For example, my PeopleController
has an Index method, but it doesn't need a template. When someone browses to root_url/people they get the default static error template.
And that's not the only controller with the issue; I want all missing template errors to redirect the user to my custom view.
- How to catch the exception?
- How to render a view afterwards?
Rails version - 3.0.19
Thanks in advance!