File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,21 @@ Warden::Manager.before_failure do |env, opts|
136
136
end
137
137
```
138
138
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
+
139
154
## License
140
155
141
156
The gem is available as open source under the terms of the [ MIT License] ( https://opensource.org/licenses/MIT ) .
Original file line number Diff line number Diff line change 5
5
# self.user_class = "User"
6
6
# current_user method name in your Controller, default: 'current_user'
7
7
# self.current_user_method = "current_user"
8
+ # Speical a table_name for AuditLog model, default: "audit_logs"
9
+ # self.table_name = "audit_logs"
8
10
end
You can’t perform that action at this time.
0 commit comments