diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-15 23:26:48 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-15 23:26:48 -0700 |
commit | b3b6ff48dff49ebbdab0a53f576bc0572116767f (patch) | |
tree | c06880cd98480cb8817801e469161e115df5ced6 /actionpack | |
parent | 9e1e95f70af3c566190f47ee7a52fd49f785ec12 (diff) | |
download | rails-b3b6ff48dff49ebbdab0a53f576bc0572116767f.tar.gz rails-b3b6ff48dff49ebbdab0a53f576bc0572116767f.tar.bz2 rails-b3b6ff48dff49ebbdab0a53f576bc0572116767f.zip |
Fix link_to with block
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 2 | ||||
-rw-r--r-- | actionpack/test/template/url_helper_test.rb | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 14d59034f1..94f1cecade 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -206,7 +206,7 @@ module ActionView 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] || {} diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 165cb655da..87b2e59255 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -238,10 +238,7 @@ class UrlHelperTest < ActionView::TestCase 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 |