Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added purge to readme

  • Loading branch information...
commit f73993c79d6e4a001032c14df108f7dd229b502d 1 parent e84b354
@rwz authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 README.md
View
16 README.md
@@ -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`:
Please sign in to comment.
Something went wrong with that request. Please try again.