diff options
author | Steven Spiel <stevenspiel@gmail.com> | 2015-04-21 09:38:20 -0400 |
---|---|---|
committer | Steven Spiel <stevenspiel@gmail.com> | 2015-04-21 09:38:20 -0400 |
commit | 58c3a0451260dfd693b47d561cf623cce1b38b99 (patch) | |
tree | 104fa14e3fbd44a4968376ff0eb8bede02efd9c1 | |
parent | 43be687bf355444d89f44c67df62401a66eb4f3d (diff) | |
download | rails-58c3a0451260dfd693b47d561cf623cce1b38b99.tar.gz rails-58c3a0451260dfd693b47d561cf623cce1b38b99.tar.bz2 rails-58c3a0451260dfd693b47d561cf623cce1b38b99.zip |
Update url_helper.rb
add block to link_to_if when condition is true
-rw-r--r-- | actionview/lib/action_view/helpers/url_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index afb1265ad9..de1ef7af45 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -410,7 +410,7 @@ module ActionView # # => <a href="/accounts/show/3">my_username</a> def link_to_if(condition, name, options = {}, html_options = {}, &block) if condition - link_to(name, options, html_options) + link_to(name, options, html_options, &block) else if block_given? block.arity <= 1 ? capture(name, &block) : capture(name, options, html_options, &block) |