app/models/concerns/repo_watchable.rb
# Get watch comment status by user_id
Get watch comment status by user_id
Get watch comment status by user_id
def watch_comment_status_by_user_id(user_id)
    action = watch_comment_by_user_actions.where("user_type = 'User' and user_id = ?", user_id).take
    return action.action_option == "ignore" ? "ignore" : "watch" if action
    repo_action = repository.watch_by_user_actions.where("user_type = 'User' and user_id = ?", user_id).take
    return "watch" if repo_action
    "unwatch"
  end
def watch_comment_status_by_user_id ( user_id ) action = watch_comment_by_user_actions . where ( "user_type = 'User' and user_id = ?" , user_id ) . take return action . action_option == "ignore" ? "ignore" : "watch" if action repo_action = repository . watch_by_user_actions . where ( "user_type = 'User' and user_id = ?" , user_id ) . take return "watch" if repo_action "unwatch" end
Get watch comment status by user_id
Get watch comment status by user_id
user_id
<not_specific>