내 폼 태그를 찾을 수 없습니다레일 컨트롤러 경로가 내보기에
<%= form_tag view_all_rater_path, :method => 'get' do %>
<p>
<%= text_field_tag :search, params[:search], :placeholder => 'Search by Set # or date' %></br>
<%= submit_tag "Search", :class => "btn btn-link", :name => nil %>
</p>
<% end %>
내 컨트롤러 액션 :
def view_all
if params[:search]
@ratings = RatingSet.find(:all, :conditions => ['id = ? or rating_date like ?', "%#{params[:search]}%"])
else
@ratings = RatingSet.all
end
end
내 경로 :
resources :rater, :only => [:index] do
collection do
get :rater_csv
get :view_all
end
end
내가/평가자로 이동하면/view_all 얻을 수있는
후 내가 얻을 단일 리소스에 내 경로를 변경 ' – Yogzzz
그리고 그것은 당신이보기에 사용하고있는 경로와 일치합니다. – sevenseacat