Skip to content

Commit 0e0ffaf

Browse files
committed
Update README
1 parent 5d0b978 commit 0e0ffaf

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,21 @@ Warden::Manager.before_failure do |env, opts|
136136
end
137137
```
138138

139+
## Configuration
140+
141+
You can write a `config/initializers/audit_log.rb` to configure the behavior of audit log.
142+
143+
```rb
144+
AuditLog.configure do
145+
# class name of you User model, default: 'User'
146+
self.user_class = "User"
147+
# current_user method name in your Controller, default: 'current_user'
148+
self.current_user_method = "current_user"
149+
# Speical a table_name for AuditLog model, default: "audit_logs"
150+
self.table_name = "audit_logs"
151+
end
152+
```
153+
139154
## License
140155

141156
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

config/initializers/audit-log.rb

+2
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
# self.user_class = "User"
66
# current_user method name in your Controller, default: 'current_user'
77
# self.current_user_method = "current_user"
8+
# Speical a table_name for AuditLog model, default: "audit_logs"
9+
# self.table_name = "audit_logs"
810
end

0 commit comments

Comments
 (0)