diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-22 09:42:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-22 09:42:09 +0000 |
commit | 4e69edb5b82f22759c5226ae8c9f402e61d7e1e7 (patch) | |
tree | 3f3ff9622b50d994fbde68b9ba611a8545dc845a /app/models/repository.rb | |
parent | 65a62431dd38f25d0856184c959866b2c8a05d62 (diff) | |
download | redmine-4e69edb5b82f22759c5226ae8c9f402e61d7e1e7.tar.gz redmine-4e69edb5b82f22759c5226ae8c9f402e61d7e1e7.zip |
Code cleanup.
git-svn-id: http://svn.redmine.org/redmine/trunk@13626 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 4d81c47ab..f1ff1a6be 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -283,8 +283,7 @@ class Repository < ActiveRecord::Base # Returns an array of committers usernames and associated user_id def committers - @committers ||= Changeset.connection.select_rows( - "SELECT DISTINCT committer, user_id FROM #{Changeset.table_name} WHERE repository_id = #{id}") + @committers ||= Changeset.where(:repository_id => id).uniq.pluck(:committer, :user_id) end # Maps committers username to a user ids |