Fix wrong parameter order in Team#team_member_by_name_or_email

This commit is contained in:
Riyad Preukschas 2012-10-17 16:55:08 +02:00
parent 51ef5b9297
commit b3a5f0a78d

View file

@ -1,7 +1,7 @@
module Team module Team
def team_member_by_name_or_email(email = nil, name = nil) def team_member_by_name_or_email(name = nil, email = nil)
user = users.where("email like ? or name like ?", email, name).first user = users.where("name like ? or email like ?", name, email).first
users_projects.find_by_user_id(user.id) if user users_projects.where(user: user) if user
end end
# Get Team Member record by user id # Get Team Member record by user id