Add infos in README.md

master
Guillaume DOTT 2013-05-29 11:17:43 +02:00
parent abd0cce54a
commit 2d60760bb1
1 changed files with 15 additions and 0 deletions

View File

@ -35,6 +35,21 @@ To define a new format, add this in an initializer :
RailsBigBrother.format = "new_format"
```
### User and controller info
To fill user and controller info, you need to define two methods in your `ApplicationController`
```ruby
def big_brother_user
''
end
def big_brother_infos
{}
end
```
`big_brother_user` must return a string.
`big_brother_infos` can return a string, an array or a hash.
### Choose events to log
You can choose which events to log with the `on` option. For example :