projects
/
depot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Finished chapter 9
[depot.git]
/
app
/
helpers
/
store_helper.rb
diff --git
a/app/helpers/store_helper.rb
b/app/helpers/store_helper.rb
index 9263619438e4c7ad14b744c6bbad2000715fe794..4a9c91c0252721aab668a5cc2cef2aa3c87792e5 100644
(file)
--- a/
app/helpers/store_helper.rb
+++ b/
app/helpers/store_helper.rb
@@
-1,2
+1,10
@@
module StoreHelper
module StoreHelper
+
+ def hidden_div_if(condition, attributes = {}, &block)
+ if condition
+ attributes["style"] = "display: none"
+ end
+ content_tag("div", attributes, &block)
+ end
+
end
end