# 20210219(금)

## 2021-02-19

### 1. 학습 날짜

* 2021-02-19

### 2. 학습 시간

* 11:00 \~ 26:00

### 3. 학습 범위 및 주제

* 백본 view, model, collection
* 루비온레일즈

### 4. 학습 목표

* PR 수정

### 5. 학습 정리

* x

### 6. 상세 학습 내용

* 코드의 대대적인 수정... 오늘도 딱히 학습한 내용은 없고, 코드만 수정했다.
* 레일즈의 모델에는 `scope` 라는게 있는데, 스코프를 사용하면 클래스 메서드를 간단하게 만들 수 있다.
* 기존에는 `def self.xxx` 처럼 함수를 만들어주고 사용했었는데 이렇게 만들면 보기에 깔끔하지 않다.
* 이런 경우에 scope 를 사용해서 만들어주면 된다.
* 루비에는 `map` 을 이용해서 각 요소에 함수를 적용할 수 있는데 `map.with_index` 라는 메서드를 추가로 달아주면 인덱스와 같이 그 값이 나온다.

### 7. 오늘 학습 내용에 대한 개인적인 총평

* 수정할게 너무 많다. 그래도 PR 리뷰를 꼼꼼하게들 해주셔서 좋다.

### 8. 다음 학습 계획

* guild index 뷰 PR 마무리


---

# 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://simian114.gitbook.io/blog/undefined-1/diary/2021/february/20210219.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.
