# 20210203(수)

## 2021-02-03

### 1. 학습 날짜

* 2020-02-03

### 2. 학습 시간

* 09:00 \~ 24:00

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

* appearance 뷰 구현하기
* 액션 케이블 연결해서 실시간 연동하기

### 4. 학습 목표

* 로그인 되어 있는 유저를 사이드바에서 확인할 수 있게 만든다.
* 액션 케이블을 연결해서 실시간으로 연동시킨다.

### 5. 학습 정리

*

### 6. 상세 학습 내용

* 이전에 모델은 두껍게 컨트롤러는 얇게라는 레일즈에 관한 이야기를 들은적이 있다. 오늘은 그 부분을 실천했다.
* `/api/users` 로 요청을 날리면 기존에는 모든 user를 다 보내게 되어 있었다. 하지만 이제는 특정 조건과 속성을 지정해서 가져올 수 있게 만들었다.
* 핵심은 쿼리의 처리다. 특정 조건들은 `status: online` 처럼 키 밸류로 보내면 되고 원하는 속성은 키를 `for` 로 밸류를 `appearance` 처럼 원하는 값을 미리 지정해놓고 하면 보내면 된다.
  * 근데 지금 생각해보니깐 키를 `for` 로 하고 원하는  속성을 배열로서 보내면 더 좋지 않을까 싶다.

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

* 오늘은 정말 최악이었다... 인터넷 환경이 정말 말도 안되게 좋지 않았고, 액션 케이블 자체도 제대로 구현한게 없다. 정말 한심하다.

### 8. 다음 학습 계획

* 사이드바 액션 케이블 연결


---

# 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/20210203.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.
