diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-21 09:37:13 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-21 13:44:54 -0300 |
commit | c091fae21f32250b19475f124c3b680dbbc163d9 (patch) | |
tree | ef563d9d74478f98b3c09008bf90de5a27408133 /actionpack/lib | |
parent | 8905c1fb496641c3cdb7b3b816ae6d3d4b2c2b73 (diff) | |
download | rails-c091fae21f32250b19475f124c3b680dbbc163d9.tar.gz rails-c091fae21f32250b19475f124c3b680dbbc163d9.tar.bz2 rails-c091fae21f32250b19475f124c3b680dbbc163d9.zip |
Merge pull request #7410 from sandeepravi/default_options_helper_value
option_tags coerced to "" instead of nil
Closes #7404
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_tag_helper.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 9e0ec17836..670ff18a66 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -119,6 +119,7 @@ module ActionView # # => <select disabled="disabled" id="destination" name="destination"><option>NYC</option> # # <option>Paris</option><option>Rome</option></select> def select_tag(name, option_tags = nil, options = {}) + option_tags ||= "" html_name = (options[:multiple] == true && !name.to_s.ends_with?("[]")) ? "#{name}[]" : name if options.delete(:include_blank) |