aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2014-08-06 10:48:52 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2014-08-06 10:48:52 -0300
commitd5be08347fb7ff758572775ec93247a3ca886004 (patch)
tree0646d5473d3a5879e738f56ef6ded0ee5603ab0c /actionview/lib
parenta8192119840c62bf2a0e564817c172191711b4b2 (diff)
parent7a0c2ba48b0145e5031e51d316407ba28d769905 (diff)
downloadrails-d5be08347fb7ff758572775ec93247a3ca886004.tar.gz
rails-d5be08347fb7ff758572775ec93247a3ca886004.tar.bz2
rails-d5be08347fb7ff758572775ec93247a3ca886004.zip
Merge pull request #16402 from bogdan/select_with_empty_block
Fixed #select form builder helper to support block without html output
Diffstat (limited to 'actionview/lib')
-rw-r--r--actionview/lib/action_view/helpers/tags/select.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/tags/select.rb b/actionview/lib/action_view/helpers/tags/select.rb
index 00881d9978..180900cc8d 100644
--- a/actionview/lib/action_view/helpers/tags/select.rb
+++ b/actionview/lib/action_view/helpers/tags/select.rb
@@ -3,7 +3,7 @@ module ActionView
module Tags # :nodoc:
class Select < Base # :nodoc:
def initialize(object_name, method_name, template_object, choices, options, html_options)
- @choices = block_given? ? template_object.capture { yield } : choices
+ @choices = block_given? ? template_object.capture { yield || "" } : choices
@choices = @choices.to_a if @choices.is_a?(Range)
@html_options = html_options