Finished chapter 9
[depot.git] / app / helpers / store_helper.rb
index 9263619438e4c7ad14b744c6bbad2000715fe794..4a9c91c0252721aab668a5cc2cef2aa3c87792e5 100644 (file)
@@ -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