How do I send an HTTP method in a route helper? i.e. I would like to call the link below from a controller action:
<%= link_to 'Submit to Scheduling', orders_path(cart_id: @cart), method: :post, data: { confirm: "Are you sure?" }, class: "primary button btn" %>
I tried orders_path(cart_id: @cart)
but that didn't work.
Neither does orders_path(cart_id: @cart, method: :post)
How do I do that?
Edit 1
orders_path GET /orders(.:format) orders#index
POST /orders(.:format) orders#create
new_order_path GET /orders/new(.:format) orders#new
edit_order_path GET /orders/:id/edit(.:format) orders#edit
order_path GET /orders/:id(.:format) orders#show
PATCH /orders/:id(.:format) orders#update
PUT /orders/:id(.:format) orders#update
DELETE /orders/:id(.:format) orders#destroy