I’m afraid that I don’t know all this well enough to accurately
explain what (I think) is going on.
Anyhow, it sounds like you’re doing:
when you should be doing
On 11-Dec-05, at 6:28 PM, List R. wrote:
Can anyone help with this? It sounds like it would be a common task.
List R. wrote:
I’d like to be able to catch ActionController::MissingTemplate
exceptions from within ActionControlle, but, MissingTemplate isn’t
defined within my controllers!!!
Right. MissingTemplate is a class that’s defined in the
How is that possible - after all, all controller subclass
ActionController, so how are exceptions it defines not there!?
No, all controllers subclass ActionController::Base (via
ApplicationController). I.e. the class called “Base” in the
Your code may be subclassing ActionController::Base but it has its
own module namespace (probably the root namespace) so any time your
code refers to a constant such as MissingTemplate it has to tell ruby
the full name - ActionController::MissingTemplate.
Bear in mind, all this has nothing to do with whether that error will
actually propagate up to a point where your code can rescue it…
And if I’m misunderstanding the true nature of your problem then
perhaps you should re-post your question with example code so that
people can get a better idea of what’s causing you grief.