From 5a019c2bfee42d8b638b92cf7abc6849bbeed760 Mon Sep 17 00:00:00 2001 From: Wes Oldenbeuving Date: Fri, 4 Oct 2013 15:05:51 +0200 Subject: [PATCH] Explicitly test for ActionController::Base in addition to Rails The code uses ActionController::Base, but it is possible to have Rails defined, but not ActionController::Base. In the old situation, the code would have raised due to ActionController::Base not being defined. --- lib/casclient.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/casclient.rb b/lib/casclient.rb index df135803..1f97c4b1 100644 --- a/lib/casclient.rb +++ b/lib/casclient.rb @@ -68,7 +68,7 @@ def method_missing(name, *args) require 'casclient/client' require 'casclient/tickets/storage' autoload :ACTIVE_RECORD_TICKET_STORE, 'casclient/tickets/storage/active_record_ticket_store' -if defined?(Rails) +if defined?(Rails) && defined?(ActionController::Base) require 'casclient/frameworks/rails/filter' require 'casclient/frameworks/rails/cas_proxy_callback_controller' end