aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-07-21 15:23:07 +0200
committerJosé Valim <jose.valim@gmail.com>2010-07-21 15:23:14 +0200
commite13e8dcf44fd27332ecd4e5c943d3d09efb58c96 (patch)
tree688e03edbb93e46ed4efff986de5b05732909658
parent9dfe9fa693c98a828dae6ad96eb9798bbdea7d81 (diff)
downloadrails-e13e8dcf44fd27332ecd4e5c943d3d09efb58c96.tar.gz
rails-e13e8dcf44fd27332ecd4e5c943d3d09efb58c96.tar.bz2
rails-e13e8dcf44fd27332ecd4e5c943d3d09efb58c96.zip
Use capture instead of yield in link_to_unless.
[#5162 state:resolved]
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 0e3cc54fd1..b493a0cb0e 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -398,7 +398,7 @@ module ActionView
def link_to_unless(condition, name, options = {}, html_options = {}, &block)
if condition
if block_given?
- block.arity <= 1 ? yield(name) : yield(name, options, html_options)
+ block.arity <= 1 ? capture(name, &block) : capture(name, options, html_options, &block)
else
name
end