My rescue_action_in_public works fine catching
ActiveRecord::RecordNotFound errors, but when I try to catch
ActionController::UnknownAction I get the following error display:
uninitialized constant UnknownAction
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
const_missing' #{RAILS_ROOT}/app/controllers/application.rb:233:in
rescue_action_in_public’
/usr/local/bin/mongrel_rails:18
This error occured while loading the following files:
action_web_service/dispatcher/action_controller/unknown_action.rb
and my rescue method:
def rescue_action_in_public(e)
case e
when ActiveRecord::RecordNotFound, ActionController::UnknownAction
render :file => "#{RAILS_ROOT}/public/404.html",
:status => 404
else
render :file => "#{RAILS_ROOT}/public/500.html",
:status => 500
end
end