diff options
author | Patricio Cano <suprnova32@gmail.com> | 2015-09-16 21:02:40 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2015-09-16 21:02:40 -0500 |
commit | 23f9a64566ec0da50c9ee842ba749a8f33eacb8e (patch) | |
tree | b65e9d4a17361cd966c0a2b585bb04b7f6d1e2ed /app | |
parent | 825db23f6750c6194932d420fa548ccfa12eddd3 (diff) | |
download | gitlab-ce-23f9a64566ec0da50c9ee842ba749a8f33eacb8e.tar.gz |
Use the `find_by_user_id` magic finder instead of `where`.
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 009e856d93c..9aed6a19e54 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -87,7 +87,7 @@ class ProjectsController < ApplicationController render 'projects/empty' else unless current_user.nil? - @membership = @project.project_members.where(user_id: current_user.id).first + @membership = @project.project_members.find_by_user_id(current_user.id) end render :show end |