diff options
author | José Valim <jose.valim@gmail.com> | 2010-07-21 15:23:07 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-21 15:23:14 +0200 |
commit | e13e8dcf44fd27332ecd4e5c943d3d09efb58c96 (patch) | |
tree | 688e03edbb93e46ed4efff986de5b05732909658 /actionpack/lib/action_view/helpers | |
parent | 9dfe9fa693c98a828dae6ad96eb9798bbdea7d81 (diff) | |
download | rails-e13e8dcf44fd27332ecd4e5c943d3d09efb58c96.tar.gz rails-e13e8dcf44fd27332ecd4e5c943d3d09efb58c96.tar.bz2 rails-e13e8dcf44fd27332ecd4e5c943d3d09efb58c96.zip |
Use capture instead of yield in link_to_unless.
[#5162 state:resolved]
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 2 |
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 |