Rails form using GET request: How to remove button and utf8 params?
ruby-on-rails
Solution
Removing the `commit` param is relatively simple, you need to specify that the input does not have a name:
submit_tag 'New Something', name: nil
Regarding the UTF-8 param...it serves an important purpose. Once you understand the purpose of the Rails UTF-8 param, and for some reason you still need to remove it, the solution is easier than you think...just don't use the form_tag helper:
# haml
%form{action: new_something_path, method: 'get'}
= select_tag :type, options_for_select(my_array)
= submit_tag 'New Something', name: nil
Problem
I'm just trying to create a simple select menu that takes you to a specific URL. So far I have something like this: ``` # haml = form_tag new_something_path, method: :get do = select_tag :type, options_for_select(my_array) = submit_tag 'New Something' ``` However, when I submit the form I get the UTF8 parameter as well as a "commit" parameter with the text of the button. How can I remove the UTF8 and commit parameters?