Commit 23f9a645 authored by Patricio Cano's avatar Patricio Cano

Use the `find_by_user_id` magic finder instead of `where`.

parent 825db23f
...@@ -87,7 +87,7 @@ class ProjectsController < ApplicationController ...@@ -87,7 +87,7 @@ class ProjectsController < ApplicationController
render 'projects/empty' render 'projects/empty'
else else
unless current_user.nil? 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 end
render :show render :show
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment