Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix content_or_options to be replaced by options and set to nil

  • Loading branch information...
commit ed4fc43287562efab01a903507cd0b9d19388a74 1 parent 28c0177
@prikha prikha authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 actionview/lib/action_view/helpers/form_tag_helper.rb
View
7 actionview/lib/action_view/helpers/form_tag_helper.rb
@@ -469,7 +469,12 @@ def submit_tag(value = "Save changes", options = {})
# # => <button data-disable-with="Please wait..." name="button" type="submit">Checkout</button>
#
def button_tag(content_or_options = nil, options = nil, &block)
- options = content_or_options.is_a?(Hash) ? content_or_options : options
+
+ if content_or_options.is_a?(Hash)
+ options = content_or_options
+ content_or_options = nil
+ end
+
options = button_tag_options_with_defaults(options)
content_tag :button, content_or_options || 'Button', options, &block
end
Please sign in to comment.
Something went wrong with that request. Please try again.