0
I는이 경로를 가지고 : 내가 사용하는 경우 투표가 기본실종 필요한 키 : [: 옵션]
match "poems/by_vote" => "poems#index" , via: [:get] , :as => :poems_by_votes , :vote => true
에 의해 시작됩니다 :
내가 함께 직면<%= link_to "by_vote" , poems_by_votes_path%>
:
No route matches {:action=>"index", :controller=>"poems", :vote=>true} missing required keys: [:option]
나는 또한 이것들을 사용했으나 아무도 일하지 않았다 :
<%= link_to "test" , poems_by_votes_path(:vote => true)%>
<%= link_to "test" , poems_by_votes_path , :options => { :vote => true } %>
<%= link_to "test" , poems_by_votes_path(true)%>
어떻게해야합니까?
이 경로는'namespace'' 범위'또는 다른 종류의 다른 블록 안에 있습니까? –
아니요 어떤 블록에도 없습니다. – Pooya
또한 생성하려고하는 URL은 무엇입니까? '/ poems/by_vote? vote = true'? –