X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=app%2Fhelpers%2Fstore_helper.rb;h=4a9c91c0252721aab668a5cc2cef2aa3c87792e5;hb=f9d45398338f9e5b2dabd768fcd793c4f81934f2;hp=9263619438e4c7ad14b744c6bbad2000715fe794;hpb=aff195f08c5fc2b8db74058b34720164148cfb4e;p=depot.git diff --git a/app/helpers/store_helper.rb b/app/helpers/store_helper.rb index 9263619..4a9c91c 100644 --- a/app/helpers/store_helper.rb +++ b/app/helpers/store_helper.rb @@ -1,2 +1,10 @@ module StoreHelper + + def hidden_div_if(condition, attributes = {}, &block) + if condition + attributes["style"] = "display: none" + end + content_tag("div", attributes, &block) + end + end