Skip to content
Browse files

Fix link_to with block

  • Loading branch information...
1 parent 9e1e95f commit b3b6ff48dff49ebbdab0a53f576bc0572116767f @jeremy jeremy committed Mar 15, 2010
Showing with 2 additions and 5 deletions.
  1. +1 −1 actionpack/lib/action_view/helpers/url_helper.rb
  2. +1 −4 actionpack/test/template/url_helper_test.rb
View
2 actionpack/lib/action_view/helpers/url_helper.rb
@@ -206,7 +206,7 @@ def link_to(*args, &block)
if block_given?
options = args.first || {}
html_options = args.second
- safe_concat(link_to(capture(&block), options, html_options))
+ link_to(capture(&block), options, html_options)
else
name = args[0]
options = args[1] || {}
View
5 actionpack/test/template/url_helper_test.rb
@@ -238,10 +238,7 @@ def test_link_tag_using_delete_javascript_and_href_and_confirm
end
def test_link_tag_using_block_in_erb
- __in_erb_template = ''
-
- link_to("http://example.com") { concat("Example site") }
-
+ output_buffer = link_to("http://example.com") { concat("Example site") }
assert_equal '<a href="http://example.com">Example site</a>', output_buffer
end

0 comments on commit b3b6ff4

Please sign in to comment.
Something went wrong with that request. Please try again.