aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafael.franca@plataformatec.com.br>2012-05-13 00:41:26 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-13 01:00:31 -0300
commit94d84c5383fd2394577a286738e9d9663c6b8f29 (patch)
tree3dd2e81f5c56b5cfd456edbf0216046e75562e0e /actionpack/lib
parenta8cfaed3389de8c12ad8c8e363df13bd93354ab4 (diff)
downloadrails-94d84c5383fd2394577a286738e9d9663c6b8f29.tar.gz
rails-94d84c5383fd2394577a286738e9d9663c6b8f29.tar.bz2
rails-94d84c5383fd2394577a286738e9d9663c6b8f29.zip
`:include_blank` should be true if the size option is nil
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/tags/base.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/base.rb b/actionpack/lib/action_view/helpers/tags/base.rb
index bf209d3a20..74a9e043c0 100644
--- a/actionpack/lib/action_view/helpers/tags/base.rb
+++ b/actionpack/lib/action_view/helpers/tags/base.rb
@@ -130,9 +130,9 @@ module ActionView
select
end
end
-
+
def option_required?(html_options)
- html_options["required"] && html_options["size"].to_i == 1 && !html_options["multiple"]
+ html_options["required"] && !html_options["multiple"] && !(html_options["size"].to_i > 1)
end
def add_options(option_tags, options, value = nil)