0

次の検索フォームがあります。

<%= form_tag edit_lot_path(:id), :class => "form-search", method: :get do %>
  <div class="input-append">
    <%= text_field_tag :id, nil, :placeholder => "Lot #", :class => "input-mini search-query" %>
    <%= button_tag(type: "submit", class: "btn") do %>
       <i class="icon-search"></i>
    <% end %>
  </div>
<% end %>

私がやろうとしているのは、検索フィールド (パスへの ID) を渡すことです。これにより、ユーザーは ID をすばやく検索できます。残念ながら、エラーが発生しますCouldn't find Lot with id=id

これはRails 4を使用していることに注意してください。

4

1 に答える 1