app/models/user.rb
# returns and owned or shared case for this user
returns and owned or shared case for this user
returns and owned or shared case for this user
def find_case case_id
    cases.find_by(id: case_id) ||
      owned_team_cases.find_by(id: case_id) ||
      shared_team_cases.find_by(id: case_id)
  end
def find_case case_id cases . find_by ( id : case_id ) || owned_team_cases . find_by ( id : case_id ) || shared_team_cases . find_by ( id : case_id ) end
returns and owned or shared case for this user
returns and owned or shared case for this user
case_id
<not_specific>