# 2021-03-07(Sun)

| 항목         | 내용                                |
| ---------- | --------------------------------- |
| 학습 날짜      | 2021-03-07(일)                     |
| 학습 시간      | 11:00\~24:00                      |
| 학습 범위 및 주제 | Rspec, soft\_delete, hard\_delete |
| 학습 목표      | Admin 모듈을 완성한다.                   |
| 동료 학습 방법   | 스크럼 후 eunhkim님과 페어프로그래밍함          |

## 상세 학습 내용

Admin 모듈의 백엔드 부분을 맡아 구현하였다.

권한 레벨을 이용해서 검증하도록 만들었다.

특정 유저나 챗 채널, 토너먼트에 대한 조작을 할 때 이미 해당 자원과 상호작용하고 있는 유저의 상태에 따라 달리 처리해야했다. 가령 챗 채널에서 채팅 중인 유저가 존재하는데 해당 챗 채널을 destroy한다면, 유저를 해당 챗룸에서 강퇴시킨 다음 destroy하는 식이다.

## 학습 내용에 대한 개인적인 총평

권한 검사에 대한 책임을 가지고 있는 메서드를 분리시켜놓은 덕분에 나름대로 '권한 검증'을 추가하기 쉬웠다.

문제는 서비스 전반에 걸쳐서 soft\_delete를 상정해서 처리해줬으면 좋았을 법한 것들을 고려하지 못한 것이 많다는 것이다. 다음에 무언가를 구현할 때는 soft\_delete로 관리할 수 있도록 처음부터 설계해야겠다.

## 다음 학습 계획

* Admin 모듈 구현


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://injun-woo30000.gitbook.io/growth-log/daily-review/2021/march/2021-03-07-sun.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
