button_to should generate <button></button> instead of <input type='submit'>, right ?

I use button_to 'Label', url a lot. Sometimes I need to add some html, for example icon button_to '<i class='fas fa-search'>Search'.html_safe, url and that is not possible unless I use it with block argument


Would not be better to have <button> as default since it is a more powerful (since it can contain other markup) than input type submit (as a value only simple text is supported) ?

Another reason is that in mini tests, it is easier to write assert_select 'button', 'Label' than `assert_select ‘input[value=?]’, ‘Label’ , right ?

https://github.com/rails/rails/pull/35143 here is pull request, it is better to discuss when there is a code :slight_smile: