Right now, I have the following and it works:
<%= link_to 'stop service', service_path(:id => @service.id, 'service[stopped]' => true, method: :put, data: { confirm: 'Are you sure?' } %>
The link looks like this: http://localhost:3000/services/1?service%5Bstopped%5D=true
So the service[stopped]
parameter gets submitted to the server as part of the query string. I need it to get submitted though as a POST/PUT form parameter instead. I tried adding 'service[stopped]' => true
inside the data
hash, but that didn't do anything.