In http://localhost:3000/services/1
I have a button to the current page with params:
<%= button_to table.seats, service_path(@service, table_id: table.id), method: :get, class=["btn"] %>
On page, I see correct:
<form class="button_to" method="get" action="/services/1?table_id=3">
<input class="btn" type="submit" value="2">
</form>
But in the service_controller
I have a breakpoint and can not see the params[:table_id] = 3
(byebug) params
{"controller"=>"services", "action"=>"show", "id"=>"1"}
What am I doing wrong?
UPDATE:
If I get the current absolute url in controller and obtain:
(byebug) request.original_url
"http://localhost:3000/services/1"
but the link in the button was:
action="/services/1?table_id=3"
How is it possible?