mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-26 12:08:47 +01:00
Use correct idiom for undefind module
This commit is contained in:
parent
07dd842525
commit
f33b747422
2 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ class LoginController < ApplicationController
|
|||
# This will allow the user to view the index page without authentication
|
||||
# but will process CAS authentication data if the user already
|
||||
# has an SSO session open.
|
||||
if (CASClient rescue nil)
|
||||
if defined? CASClient
|
||||
# Only require sub-library if gem is installed and loaded
|
||||
require 'casclient/frameworks/rails/filter'
|
||||
before_filter CASClient::Frameworks::Rails::GatewayFilter, :only => :login_cas
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ end
|
|||
|
||||
if ( SITE_CONFIG['authentication_schemes'].include? 'cas')
|
||||
#requires rubycas-client gem to be installed
|
||||
if (CASClient rescue nil)
|
||||
if defined? CASClient
|
||||
require 'casclient/frameworks/rails/filter'
|
||||
CASClient::Frameworks::Rails::Filter.configure(
|
||||
:cas_base_url => SITE_CONFIG['cas_server'] ,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue