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