我的路线包含以下内容:
namespace :admin do
resources :retailers
resources :drop_ship_orders do
collection do
post :edit_individual
put :update_individual
end
member do
put :fire
get :fire
post :resend
end
end
end
我的观点包含:
<%= form_tag edit_individual_drop_ship_orders_path do %>
<table class="index" id='listing_orders'>
<thead>
<tr data-hook="admin_orders_index_headers">
<th><%= check_box_tag('test') %></th>
<% if @show_only_completed %>
<th><%= sort_link @search, :completed_at, t("activerecord.attributes.order.completed_at") %></th>
<% else %>
<th><%= sort_link @search, :created_at, t("order_date") %></th>
<% end %>
<th><%= sort_link @search, :number, t("order_number") %></th>
<th><%= sort_link @search, :state, t("status") %></th>
<th><%= sort_link @search, :shipment_state, t("shipment_state") %></th>
<th><%= sort_link @search, :email, t("customer") %></th>
<th><%= sort_link @search, :total, t("total") %></th>
<th data-hook="admin_orders_index_header_actions"></th>
</tr>
</thead>
<tbody>
<% @orders.each do |order| %>
<tr data-hook="admin_orders_index_rows">
<td><%= check_box_tag "drop_ship_order_ids[]", order.id %></td>
<td><%= l (@show_only_completed ? order.order.completed_at : order.order.created_at).to_date %></td>
<td><strong><%= order.order.number %></strong></td>
<td><%= t("order_state.#{order.state.downcase}") %></td>
<td><%#= link_to t("shipment_states.#{order.order.shipment_state}"), admin_order_shipments_path(order) if order.shipment_state %></td>
<td><%= order.order.email %><br><%= order.order.ship_address.firstname%> <%= order.order.ship_address.lastname %><br><%= order.order.ship_address.phone %></td>
<td><%= number_to_currency order.total %></td>
<td class='actions' data-hook="admin_orders_index_row_actions">
<%= button_link_to t(:process_order), edit_admin_drop_ship_order_url(order) unless order.completed?%>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= will_paginate(@orders, :previous_label => "« #{t('previous')}", :next_label => "#{t('next')} »") %>
<%= submit_tag (t('multi_process')) %>
<% end %>
Rails 无法识别 edit_individual_drop_ship_orders_path
在我的控制器中,我添加了 edit_individual 操作。
我的错误:#<#:0x000001067314a8> 的未定义局部变量或方法`edit_individual_drop_ship_orders_path'
有人可以帮我吗?
谢谢