lib/devise/oauth2_providable/models.rb
# Try to load model_sym as class
# If class does not exist, it return nil
Try to load model_sym as class
If class does not exist, it return nil
Try to load model_sym as class If class does not exist it return nil
def model_for_sym model_sym
        begin
          model = model_sym.to_s.camelize.constantize
        rescue Exception => e
        end
        model
      end
def model_for_sym model_sym begin model = model_sym . to_s . camelize . constantize rescue Exception => e end model end
Try to load model_sym as class
If class does not exist, it return nil
Try to load model_sym as class If class does not exist it return nil
# The following case do not append # "SSLError".underscore.camelize # => "SslError" #puts "load : #{model_sym}" #puts "model_sym exception : #{e.message}" # Nothing to do, we failed to load constant
model_sym
<not_specific>