diff options
Diffstat (limited to 'actionpack/lib/action_view/helpers/tag_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/tag_helper.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index 999cbfb52a..e669620381 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -66,12 +66,9 @@ module ActionView def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block) if block_given? options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash) - content = capture(&block) - content_tag = content_tag_string(name, content, options, escape) - block_is_within_action_view?(block) ? concat(content_tag, block.binding) : content_tag + concat(content_tag_string(name, capture(&block), options, escape)) else - content = content_or_options_with_block - content_tag_string(name, content, options, escape) + content_tag_string(name, content_or_options_with_block, options, escape) end end @@ -126,7 +123,7 @@ module ActionView end def block_is_within_action_view?(block) - eval("defined? _erbout", block.binding) + !@output_buffer.nil? end end end |