diff --git a/lib/tasks/gitlab.rake b/lib/tasks/gitlab.rake index 0e3612bc2..c5b19dfa6 100644 --- a/lib/tasks/gitlab.rake +++ b/lib/tasks/gitlab.rake @@ -28,7 +28,7 @@ namespace :gitlab do task :useless_user => :environment do # projects = Project.where(:id => [6286, 6292, 6293, 6294]) - users = User.where("SELECT * FROM `users` where gid is not null group by gid having count(*)=2") + users = User.find_by_sql("SELECT * FROM `users` where gid is not null group by gid having count(*)=2") # users = User.where(:gid => 8823) users.each do |user| puts "start"+ "#{user.id}"