Rails 2.0.2에서 조건을 기반으로 찾기를 제한하려고합니다.레일 : 조건이있는 find_by_contents; syntax help please
찾기 문 :
:conditions=>["archived = '0'"]
을 찾아이
@employees = Employee.find_by_contents(params[:keywords].to_s, :include => [ :categories, :revisions, :approvals, :archives, :related_documents ], :conditions=>["archived = '0'"])
누구나 구문이 있어야 할 무엇인지 작동하지 않지만
@employees = Employee.find_by_contents(params[:keywords].to_s, :include => [ :categories, :revisions, :approvals, :archives, :related_documents ])
필요는 조건을 제한하는 추가?
그럼 예외는? 어떤 오류가 있습니까? – fl00r
'archived' 필드의 유형은 무엇입니까? 정말로'스트립'? 또는 '불리언'? – fl00r
오류가 없습니다. 조건문을 무시했습니다. 부울 – Jeffrey