We use rubycas-client in a Rack-based project where we use do ActiveRecord, but not ActionController. In combination with standalone-migrations (which does a require on Rails to get ActiveRecord + migrations code loaded), this creates the situation where:
Rails is defined
ActionController is not defined
rubycas-client does a check if Rails is defined, and if so it goes ahead and loads the Rails-specific extensions.
The problem here is that the rubycas-client Rails extensions are actually for ActionController, which is usually included when Rails exists, but not always (as in our situation).
I've included a patch which checks explicitly for ActionController::Base in addition to Rails, prior to attempting to load the Rails extensions.
We use rubycas-client in a Rack-based project where we use do ActiveRecord, but not ActionController. In combination with standalone-migrations (which does a require on Rails to get ActiveRecord + migrations code loaded), this creates the situation where:
rubycas-client does a check if Rails is defined, and if so it goes ahead and loads the Rails-specific extensions.
The problem here is that the rubycas-client Rails extensions are actually for ActionController, which is usually included when Rails exists, but not always (as in our situation).
I've included a patch which checks explicitly for ActionController::Base in addition to Rails, prior to attempting to load the Rails extensions.
Can the code be merged into master?