diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index 539656f88f..8a4d1e3a8f 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -214,20 +214,24 @@ module ActionView # using the +link_to+ method with the :method modifier as described in # the +link_to+ documentation. # - # By default, the generated form element has a class name of button_to - # to allow styling of the form itself and its children. This can be changed - # using the :form_class modifier within +html_options+. You can control - # the form submission and input element behavior using +html_options+. - # This method accepts the :method modifier described in the +link_to+ documentation. - # If no :method modifier is given, it will default to performing a POST operation. - # You can also disable the button by passing disabled: true in +html_options+. - # If you are using RESTful routes, you can pass the :method - # to change the HTTP verb used to submit the form. + # You can control the form and button behavior with +html_options+. Most + # values in +html_options+ are passed through to the button element. For + # example, passing a +:class+ option within +html_options+ will set the + # class attribute of the button element. + # + # The class attribute of the form element can be set by passing a + # +:form_class+ option within +html_options+. It defaults to + # "button_to" to allow styling of the form and its children. + # + # The form submits a POST request by default. You can specify a different + # HTTP verb via the +:method+ option within +html_options+. # # ==== Options # The +options+ hash accepts the same options as +url_for+. # - # There are a few special +html_options+: + # Most values in +html_options+ are passed through to the button element, + # but there are a few special options: + # # * :method - \Symbol of HTTP verb. Supported verbs are :post, :get, # :delete, :patch, and :put. By default it will be :post. # * :disabled - If set to true, it will generate a disabled button.