You are doing it wrong, which is very important in Rails, where conditional configuration is such an important ideal.
If the order has many tasks, your route should look like this:
/orders/:order_id/tasks/new
And your routes should be configured this way:
resources :orders do resources :tasks end
You should [almost] never encounter record identifiers in the query string. In fact, you will almost never find query strings in Rails yourself.
source share