Skip to content

Commit

Permalink
Explicitly test for ActionController::Base in addition to Rails
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Narnach committed Oct 4, 2013
1 parent d0e22cb commit 5a019c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/casclient.rb
Expand Up @@ -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
Expand Down

0 comments on commit 5a019c2

Please sign in to comment.