Changeset 7260
- Timestamp:
- 08/02/07 18:21:20 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/exception_notification/lib/exception_notifiable.rb
r6216 r7260 47 47 end 48 48 end 49 50 def exceptions_to_treat_as_404 51 exceptions = [ActiveRecord::RecordNotFound, 52 ActionController::UnknownController, 53 ActionController::UnknownAction] 54 exceptions << ActionController::RoutingError if ActionController.const_defined?(:RoutingError) 55 exceptions 56 end 49 57 end 50 58 … … 72 80 def rescue_action_in_public(exception) 73 81 case exception 74 when * exceptions_to_treat_as_40482 when *self.class.exceptions_to_treat_as_404 75 83 render_404 76 84 … … 89 97 end 90 98 end 91 92 def exceptions_to_treat_as_40493 exceptions = [ActiveRecord::RecordNotFound,94 ActionController::UnknownController,95 ActionController::UnknownAction]96 exceptions << ActionController::RoutingError if ActionController.const_defined?(:RoutingError)97 exceptions98 end99 99 end