4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/ixtlan/rails/rescue_module.rb', line 4
def self.included(controller)
controller.rescue_from ::Ixtlan::StaleResourceError, :with => :stale_resource
controller.rescue_from ::Ixtlan::GuardException, :with => :page_not_found
controller.rescue_from ::Ixtlan::PermissionDenied, :with => :page_not_found
controller.rescue_from ::DataMapper::ObjectNotFoundError, :with => :page_not_found
controller.rescue_from ::ActionController::RoutingError, :with => :page_not_found
controller.rescue_from ::ActionController::UnknownAction, :with => :page_not_found
controller.rescue_from ::ActionController::MethodNotAllowed, :with => :page_not_found
controller.rescue_from ::ActionController::NotImplemented, :with => :page_not_found
controller.rescue_from ::ActionController::InvalidAuthenticityToken, :with => :stale_resource
unless controller.consider_all_requests_local
controller.rescue_from ::ActionView::MissingTemplate, :with => :internal_server_error
controller.rescue_from ::ActionView::TemplateError, :with => :internal_server_error
end
end
|