effective_logging 3.0.10 → 3.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ced9c07cb086b859429b90b1ccbac95ae8e201b775bcd583b3d289004289094d
4
- data.tar.gz: 7411b720f373bc75ad92be98649481daefc15755d972835909e65d272d243b40
3
+ metadata.gz: 62d539b7dc09aceba5ef177b28855ca353575ad22360c42b7a6efa6bd4fcb95f
4
+ data.tar.gz: 2bef3c5f0bf3d346f9413d36ad90cc6a52616d25b0b5b0650c635648e2c07acd
5
5
  SHA512:
6
- metadata.gz: caef27d98294627b0a21fa7d6dee8ab0d08d86e8297eddcbfcc403724bbfb75ca79b317192ee96ef744704e88fd03a04b41a913289c7a6e1c92753a140640a38
7
- data.tar.gz: 579cabf40e8107f4a44c23da05e87c7d6887c4e7604b265475a8a4ae6769f99ce421e3e358df70f1d56935e06724254ceebec651cf8a41f5935811d44ad5cff2
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
- # before_action :set_effective_logging_current_user
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
- yield if block_given?
10
+
11
+ if block_given?
12
+ yield
13
+ EffectiveLogging.current_user = nil
14
+ end
11
15
  end
12
16
 
13
17
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveLogging
2
- VERSION = '3.0.10'.freeze
2
+ VERSION = '3.0.11'.freeze
3
3
  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.10
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-09-08 00:00:00.000000000 Z
11
+ date: 2020-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails