From 94d84c5383fd2394577a286738e9d9663c6b8f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sun, 13 May 2012 00:41:26 -0300 Subject: `:include_blank` should be true if the size option is nil --- actionpack/lib/action_view/helpers/tags/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view/helpers') 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) -- cgit v1.2.3