Permalink
Browse files

document `before` and `after` in the README

  • Loading branch information...
1 parent d4b5b4b commit 0c49c2a86b2fba8f569b701b0ae2a28e1f59d966 Matthew Kane Parker committed Oct 5, 2012
Showing with 19 additions and 0 deletions.
  1. +19 −0 readme.markdown
View
@@ -112,6 +112,25 @@ You can tell `frill` to consider only a subset of frills for decoration with the
<%= render frill(@posts, with: [TextPostFrill, PicturePostFrill, VideoPostFrill])
```
+### Order your frill dependencies
+
+If you want to specify the order in which frills are applied, you can use `before` and `after` in your frill modules:
+
+```ruby
+module FooFrill
+ before BarFrill
+end
+
+module BazFrill
+ after BarFrill
+end
+
+module BarFrill
+end
+```
+
+With this setup, `frill` will attempt to apply the modules in the following order: `FooFrill`, `BarFrill`, `BazFrill`.
+
## A longer story
Your product manager writes the following story for you:

0 comments on commit 0c49c2a

Please sign in to comment.