From 58c3a0451260dfd693b47d561cf623cce1b38b99 Mon Sep 17 00:00:00 2001 From: Steven Spiel Date: Tue, 21 Apr 2015 09:38:20 -0400 Subject: Update url_helper.rb add block to link_to_if when condition is true --- actionview/lib/action_view/helpers/url_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview/lib/action_view/helpers/url_helper.rb') 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 # # => my_username 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) -- cgit v1.2.3