AWDWR: NameError (uninitialized constant UnknownAction) in r

I copied (and modified) this code from AWDWR:

def rescue_action_in_public(exception)
case exception
when ActiveRecord::RecordNotFound,
ActionController::UnknownAction
render :template=>‘/error’, :layout=>‘application’,
:status=>‘404 Not Found’
else
render :template=>‘/error’, :layout=>‘application’,
:status=>‘500 Error’
end

Notifier.deliver_exception(self, request, exception)

end

It works, except when an ‘unknown action’ occurs, then
it displays this in the log:

NameError (uninitialized constant UnknownAction):

/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.rb:200:in
const_missing' .//app/controllers/application.rb:63:in rescue_action_in_public’

Any idea what the problem is?

Thanks
csn


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

CSN wrote:

:status=>‘500 Error’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.rb:200:in
const_missing' .//app/controllers/application.rb:63:inrescue_action_in_public’

Try ::ActionController::UnknownAction


We develop, watch us RoR, in numbers too big to ignore.