From 65fffeac3f960f9c74d693525a73ac14b201bf2b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 12 Mar 2019 17:34:00 +0100 Subject: Redesign landing page (#10232) --- app/helpers/home_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index 9b3f1380b..1f648649f 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -56,4 +56,12 @@ module HomeHelper 'emojify' end end + + def optional_link_to(condition, path, options = {}, &block) + if condition + link_to(path, options, &block) + else + content_tag(:div, &block) + end + end end -- cgit