Improved commit author detection
This commit is contained in:
parent
f87f0201f0
commit
b4868a8972
2 changed files with 8 additions and 3 deletions
|
@ -50,6 +50,11 @@ class Project < ActiveRecord::Base
|
|||
code
|
||||
end
|
||||
|
||||
def team_member_by_name_or_email(email = nil, name = nil)
|
||||
user = users.where("email like ? or name like ?", email, name).first
|
||||
users_projects.find_by_user_id(user.id) if user
|
||||
end
|
||||
|
||||
def common_notes
|
||||
notes.where(:noteable_type => ["", nil])
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue