Skip to content

Commit

Permalink
fixes #16717 - input_group_btn option no longer added to field
Browse files Browse the repository at this point in the history
When input_group_btn was passed to text_f (as in the host name field),
it was added as an attribute to the textbox as well as being output.
  • Loading branch information
domcleal authored and dLobatog committed Oct 4, 2016
1 parent ca59bac commit 9cd2bc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/form_helper.rb
Expand Up @@ -367,8 +367,8 @@ def field(f, attr, options = {})
content_tag(:div, :class => "#{wrapper_class} #{error.empty? ? '' : 'has-error'}",
:id => options.delete(:control_group_id)) do
input = capture do
if options[:input_group_btn]
input_group(yield.html_safe, input_group_btn(options[:input_group_btn]))
if (group_btn = options.delete(:input_group_btn))
input_group(yield.html_safe, input_group_btn(group_btn))
else
yield.html_safe
end
Expand Down

0 comments on commit 9cd2bc6

Please sign in to comment.