From 7a529b24ee40e1018d6367d94b9ecbd25c1c81a9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 7 Jul 2012 13:53:38 +0000 Subject: [PATCH] Code cleanup. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9935 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/auth_source.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/auth_source.rb b/app/models/auth_source.rb index bfec5f20c..784415863 100644 --- a/app/models/auth_source.rb +++ b/app/models/auth_source.rb @@ -59,7 +59,7 @@ class AuthSource < ActiveRecord::Base # Try to authenticate a user not yet registered against available sources def self.authenticate(login, password) - AuthSource.find(:all, :conditions => ["onthefly_register=?", true]).each do |source| + AuthSource.where(:onthefly_register => true).all.each do |source| begin logger.debug "Authenticating '#{login}' against '#{source.name}'" if logger && logger.debug? attrs = source.authenticate(login, password)