1

I write this redirection :

redirect_to list_order_submit_path(:provider_id => @cart_item.product.provider.id)

But this show the Provider_id in URL:

localhost:3000/order/list?provider_id=1

How can i pass the variable not in URL or how I make this get to a post param ?

Drextor
  • 433
  • 1
  • 6
  • 24

2 Answers2

3

I'll quote the beginning of this SO answer for later viewers:

You can't do a redirect and send POST data at the same time in the HTTP spec.

Community
  • 1
  • 1
born4new
  • 1,677
  • 12
  • 12
0

You shouldn't do it. What you want is a GET petition because you are listing elements and not modifying them.

So passing the argument in the header is correct and the best practice.