DonutWorks / Ari

0 stars 0 forks source link

TO공지에서 남에 동아리 사람이 보임 #406

Closed yhoonkim closed 9 years ago

yhoonkim commented 9 years ago

재현

  1. 두개의 동아리(A,B)를 만듭니다.
  2. 각각의 동아리에 회원을 추가합니다.
  3. A동아리에서 TO공지를 만들고 관리페이지에 접속하여봅니다.
  4. B동아리 사람이 보입니다.

예상원인 view/admin/notice/show.html.erb에서 partial들을 render할 때

...
<div>
     <h3>참가 <small>(총 <%= User.responsed_yes(@notice).count %>명)</small></h3>
     <%= render partial: "table", locals: { users: User.responsed_yes(@notice).order_by_responsed_at.decorate, type: "yes" } %>

</div>
...

에서 User가 아닌 current_club.user로 해줘야 할 것 같습니다.

angdev commented 9 years ago

아 그러게요 저거 왜 안 고쳤을까 (..

저런 부분 다 안 고쳐졌을 것 같습니다. User.responsed 로 검색하면 될듯

yhoonkim commented 9 years ago

@FeGs 내가 고치는중...

angdev commented 9 years ago

근데 responsed_yes(@notice) 라서 괜찮을 줄 알았는데 ...

yhoonkim commented 9 years ago

yse는 사실 괜찮은데 no 같이 나머지애들 불러오는거, unreaders같은 것들이 문제임ㅠ 힝

angdev commented 9 years ago

확실히 그렇군.. 으