I'm trying to switch to using image_submit_tag instead of submit_tag so I can have a nice looking button. But the parameter list is getting mangled:
<% form_tag 'reports', {:method => 'get'} do %>
...
image_submit_tag("image.png", :name => 'filter')
...
This gets converted to the following HTML:
<form action="reports" method="get">
...
<input name="filter" src="/images/add_filter.png?1391926927" type="image">
...
Looks good to me, but then when the controller function gets called, I get this for the param list:
{"filter.y"=>"9", "filter.x"=>"9", "controller"=>"reports", "action"=>"index"}
I use the name to determine what button was pressed. How are the x and y values getting merged into my name? It works fine with regular submit_tag.
I found this thread which touches upon the x and y values, but doesn't mention why they'd get merged into the name field. Definitely strange. Any help is appreciated! No irrelevant criticism for still being on RoR 2.3 please.