diff options
author | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2012-05-13 00:42:19 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-13 01:00:31 -0300 |
commit | 30818561158dce27f3b0ae3f659a7bfdc867b834 (patch) | |
tree | dfbcb55d73d8b4eeff0d0725543e85c6867cd4d2 /actionpack/lib/action_view/helpers | |
parent | 94d84c5383fd2394577a286738e9d9663c6b8f29 (diff) | |
download | rails-30818561158dce27f3b0ae3f659a7bfdc867b834.tar.gz rails-30818561158dce27f3b0ae3f659a7bfdc867b834.tar.bz2 rails-30818561158dce27f3b0ae3f659a7bfdc867b834.zip |
Only set `:include_blank` if the value of this options is not present
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/tags/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/base.rb b/actionpack/lib/action_view/helpers/tags/base.rb index 74a9e043c0..607954e762 100644 --- a/actionpack/lib/action_view/helpers/tags/base.rb +++ b/actionpack/lib/action_view/helpers/tags/base.rb @@ -121,7 +121,7 @@ module ActionView def select_content_tag(option_tags, options, html_options) html_options = html_options.stringify_keys add_default_name_and_id(html_options) - options[:include_blank] = true if option_required?(html_options) + options[:include_blank] ||= true if option_required?(html_options) select = content_tag("select", add_options(option_tags, options, value(object)), html_options) if html_options["multiple"] && options.fetch(:include_hidden, true) |