2011-03-04 5 views

답변

2

"조건"절 in the documentation을 참조하십시오. 여기서 조건에 여러 매개 변수를 사용하는 방법을 설명합니다. 귀하의 질의는 다음과 같이 작성됩니다 :

@comments = @company.comments.where('approved = ? OR ip = ?', true, request.remote_ip).all 
관련 문제