Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Commit

Permalink
Add section for aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
paulelliott committed Feb 12, 2012
1 parent f4a7199 commit 132855d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions views/_content.markdown
Expand Up @@ -161,6 +161,16 @@ To hook into Fabrication's build cycle for the object, you can use
The callbacks are all stackable, meaning that you can declare multiple in a
fabricator and they will not be clobbered when you inherit another fabricator.

#### Aliases

You can provide aliases for a fabricator by supplying the :aliases option to
the Fabricator call.

Fabricator(:thingy, aliases: [:widget, :wocket])

You can now call Fabricate with :thingy, :widget, or :wocket and receive back
the generated object.

#### Reloading

If you need to reset fabrication back to its original state after it has been
Expand Down

0 comments on commit 132855d

Please sign in to comment.