2011-08-15 4 views
0

나는 고정 DB에서 rhomobile 검색을 시도합니다.Rhomobile 검색 질문

그러나 주어진 QID

<%[email protected]%> 
<% @antworts = Antwort.find(:conditions=>{'qid'=>@questions.id})%> 
    <% @antworts.each do |antwort| %> 

     <li> 
     <a href="sdfsdf"> 
     <%= antwort.antwort %> 
     </a> 
     </li> 

    <% end %> 
</ul> 

어떤 생각 이유와 DB에있는 모든 항목 대신에 사람을 반환? find_all하는

Antwort.find(:all, :conditions=>{'qid'=>@questions.id}) 

을 또는 방법을 변경 : 첫 번째 인수의 모든 : 첫 번째 또는 두 :

답변

0

당신은 통과해야 더글라스 .... 근무

Antwort.find_all(:conditions=>{'qid'=>@questions.id}) 
+0

감사합니다! –