https://github.com/rails/rails/pull/35143 here is pull request, it is better to discuss when there is a code :)
On Sunday, February 3, 2019 at 12:20:19 PM UTC+1, Dusan Orlovic wrote: > > 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 > > https://github.com/rails/rails/blob/9f0928322fe0c1209e9cfd97020129797b5e635d/actionview/lib/action_view/helpers/url_helper.rb#L330 > > 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 ? > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.