diff options
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/helpers/form_tag_helper.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 961d01eff4..326e303971 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -469,16 +469,13 @@ module ActionView # # => <button data-disable-with="Please wait..." name="button" type="submit">Checkout</button> # def button_tag(content_or_options = nil, options = nil, &block) - default_options = { 'name' => 'button', 'type' => 'submit' } - if content_or_options.is_a? Hash options = content_or_options else options ||= {} end - options = options.stringify_keys - options = options.reverse_merge default_options + options = { 'name' => 'button', 'type' => 'submit' }.merge!(options.stringify_keys) if block_given? content_tag :button, options, &block |