Permalink
Browse files

Added purge to readme

  • Loading branch information...
1 parent e84b354 commit f73993c79d6e4a001032c14df108f7dd229b502d @rwz committed Apr 14, 2013
Showing with 15 additions and 1 deletion.
  1. +15 −1 README.md
View
@@ -9,7 +9,7 @@ Nestive adds powerful layout and view helpers to your Rails app. It's similar to
Nestive is *better* because it addresses these problems.
-## Just five methods (so far) – `area`, `extends`, `append`, `prepend`, `replace`.
+## Just six methods (so far) – `area`, `extends`, `append`, `prepend`, `replace` and `purge`.
### Declaring an area of content in your parent layout with `area`:
@@ -70,6 +70,20 @@ You can also replace any content provided by parent layouts:
<% end %>
```
+### Removing content
+
+You can remove the content of the area:
+
+``` erb
+<% purge :sidebar %>
+```
+
+... which is equal to:
+
+``` erb
+<% replace :sidebar, nil %>
+```
+
### Extending a layout in a child layout (or view):
Any layout (or view) can declare that it wants to inherit from and extend a parent layout, in this case we're extending `app/views/layouts/application.html.erb`:

0 comments on commit f73993c

Please sign in to comment.