Browse Source

Code cleanup.

git-svn-id: http://svn.redmine.org/redmine/trunk@13626 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/3.0.0
Jean-Philippe Lang 9 years ago
parent
commit
4e69edb5b8
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      app/models/repository.rb

+ 1
- 2
app/models/repository.rb View File

@@ -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

Loading…
Cancel
Save