Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
steffendsommer committed Dec 11, 2018
1 parent e4a3fdc commit de7d608
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,13 @@ Please note that the `SessionsMiddleware` needs to be added to the same route gr

### Adding the Leaf tag

#### Using a shared Leaf tag config

This package supports using a shared Leaf tag config which removes the task of registering the tags from the consumer of this package. Please see [this description](https://github.com/nodes-vapor/sugar#mutable-leaf-tag-config) if you want to use this.

#### Manually registering the Leaf tag(s)

In order to render Flash messages, you will need to add the Flash Leaf tag:

```swift
public func configure(_ config: inout Config, _ env: inout Environment, _ services: inout Services) throws {
services.register { _ -> LeafTagConfig in
var tags = LeafTagConfig.default()
tags.use(FlashTag(), as: "flash")
tags.useFlashLeafTags()
return tags
}
}
Expand Down

0 comments on commit de7d608

Please sign in to comment.