effective_logging 3.0.10 → 3.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -8
- data/lib/effective_logging/set_current_user.rb +6 -2
- data/lib/effective_logging/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62d539b7dc09aceba5ef177b28855ca353575ad22360c42b7a6efa6bd4fcb95f
|
4
|
+
data.tar.gz: 2bef3c5f0bf3d346f9413d36ad90cc6a52616d25b0b5b0650c635648e2c07acd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0490c23500c6bd71810b432cfd44291d033fb16e14c1de1fbe37fd8a1c8228f18638140f6fa9ab4be2b6827d303af7c5a19ffc5f351cebf81bd14f260765588
|
7
|
+
data.tar.gz: 15ab06e638ce08d4ea88dfd1e586a8b447b998e8969e971212873edb56db314e9cdf78236f1f6de57d8747afda30c36ba18aa0267ec808118713733cd7ccadb5
|
data/README.md
CHANGED
@@ -211,14 +211,6 @@ class Post < ActiveRecord::Base
|
|
211
211
|
end
|
212
212
|
```
|
213
213
|
|
214
|
-
and to your controller:
|
215
|
-
|
216
|
-
```ruby
|
217
|
-
class ApplicationController < ActionController::Base
|
218
|
-
before_action :set_effective_logging_current_user
|
219
|
-
end
|
220
|
-
```
|
221
|
-
|
222
214
|
Then to see the log for this resource, on any view:
|
223
215
|
|
224
216
|
```erb
|
@@ -3,11 +3,15 @@ module EffectiveLogging
|
|
3
3
|
module ActionController
|
4
4
|
|
5
5
|
# Add me to your ApplicationController
|
6
|
-
#
|
6
|
+
# around_action :set_effective_logging_current_user
|
7
7
|
|
8
8
|
def set_effective_logging_current_user
|
9
9
|
EffectiveLogging.current_user = current_user
|
10
|
-
|
10
|
+
|
11
|
+
if block_given?
|
12
|
+
yield
|
13
|
+
EffectiveLogging.current_user = nil
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|