What is the proper way to have any invalid request fall back to a specific action and controller?
That is, instead of seeing an error like those below, I would like control to pass to my main controller action.
I think you need to implement rescue_action. This gets called
whenever an exception is thrown, so you need to check whether the
exception corresponds to the missing action one and then do as
appropriate.
Rails 2.0 has a much nicer way of dealing with this, since you can do
class PostsController < ApplicationController rescue_from FooError, :with => :foo_handler
protected def foo_handler end end
Fred