Routes problem with path helper in rails 3 -
my route contains following:
namespace :admin resources :retailers resources :drop_ship_orders collection post :edit_individual put :update_individual end member put :fire :fire post :resend end end end
my view contains:
<%= form_tag edit_individual_drop_ship_orders_path %> <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 |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 doesn't recognize edit_individual_drop_ship_orders_path
in controller added edit_individual action.
my error: undefined local variable or method `edit_individual_drop_ship_orders_path' #<#:0x000001067314a8>
can please me out?
thank you
two things when have problems routes: 1. restart server 2. check rake routes
Comments
Post a Comment