0
也沒有路由匹配這是視圖中的代碼。即使將路由添加到routes.rb
<% form_tag({:controller => 'users',
:action => 'test'}) do %>
<%= text_field_tag(:search_options, params[:search_options])%>
<%= submit_tag("Display text!")%>
<% end -%>
我有一個文件test.html.erb並還增加了獲取「用戶/測試」的routes.rb還是我得到錯誤:沒有路由匹配「/用戶/測試」
的'耙routes'命令可用於調試這些問題有所幫助。我建議添加'rake routes |的輸出grep user'到你的問題中,並在'users_controller'中定義的動作列表 – andrewmitchell 2011-05-26 07:49:04