This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README.markdown | ||
| |
Rakefile | ||
| |
init.rb | ||
| |
lib/ | ||
| |
test/ |
README.markdown
ContentGiven
Adds a very small helper to your views for determining if content_for :foo was used.
This means you don't always have to render the containing markup around yield :foo.
Example
Before content_given:
<!-- In app/views/layouts/application.html.erb %>
<html>
<body>
<div id="sidebar">
<%= yield :sidebar
</div>
<div id="content">
<%= yield %>
</div>
</body>
</html>
<div id="sidebar"> is always rendered.
After content_given:
<!-- In app/views/layouts/application.html.erb %>
<html>
<body>
<% if content_given? :sidebar %>
<div id="sidebar">
<%= yield :sidebar
</div>
<% end %>
<div id="content">
<%= yield %>
</div>
</body>
</html>
<div id="sidebar"> is only rendered if you used content_for :sidebar
Copyright
Copyright (c) 2008 Josh Nichols, released under the MIT license








