diff options
author | Sergey Prikhodko <prikha@gmail.com> | 2014-03-03 15:40:16 +0400 |
---|---|---|
committer | Sergey Prikhodko <prikha@gmail.com> | 2014-03-03 15:48:48 +0400 |
commit | 4a7c8ef793dd5b13026efcc4a5a004bf96b0d1ea (patch) | |
tree | 8da106115f6918f00c0a472ec0ee054a0b11ae96 | |
parent | aa2101ed33438fac494e7fc5510e4465f730ad2b (diff) | |
download | rails-4a7c8ef793dd5b13026efcc4a5a004bf96b0d1ea.tar.gz rails-4a7c8ef793dd5b13026efcc4a5a004bf96b0d1ea.tar.bz2 rails-4a7c8ef793dd5b13026efcc4a5a004bf96b0d1ea.zip |
fix button tag without options
-rw-r--r-- | actionview/lib/action_view/helpers/form_tag_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index b3f681e6a7..ccb5c036dc 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -469,7 +469,7 @@ module ActionView # # => <button data-disable-with="Please wait..." name="button" type="submit">Checkout</button> # def button_tag(content_or_options = nil, options = nil, &block) - if block_given? && content_or_options.is_a?(Hash) + if block_given? options = button_tag_options_with_defaults(content_or_options) content_tag :button, options, &block else @@ -744,7 +744,7 @@ module ActionView def button_tag_options_with_defaults(options) options = options || {} - options.stringify_keys! + options = options.stringify_keys default_options = { 'name' => 'button', 'type' => 'submit' } options.reverse_merge default_options |