effective_logging 1.8.1 → 1.9.0
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 +8 -0
- data/lib/effective_logging/set_current_user.rb +0 -9
- data/lib/effective_logging/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8579f18cb5a349073e20276b59d179894d2f4a47
|
|
4
|
+
data.tar.gz: 45ce181f84a26e8d3643b0cf963b4db2e5bfb1f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6d687512499402104b60abfe397d44ec7463fc4d114918b3285f528f8cc56721bfe22bcd393d8e71604c71ee4c322f0290e6a22225d4a9a14cd81101aeb4662
|
|
7
|
+
data.tar.gz: 9ba528f0e309582355fd07595ca9580c682d03c7dca31c8be402449413324089a00c04a6eef7450d51dcea2593b51077b1fde928f8e3c2330d546890dd0be769
|
data/README.md
CHANGED
|
@@ -207,6 +207,14 @@ class Post < ActiveRecord::Base
|
|
|
207
207
|
end
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
+
and to your controller:
|
|
211
|
+
|
|
212
|
+
```ruby
|
|
213
|
+
class ApplicationController < ActionController::Base
|
|
214
|
+
before_action :set_effective_logging_current_user
|
|
215
|
+
end
|
|
216
|
+
```
|
|
217
|
+
|
|
210
218
|
Then to see the log for this resource, on any view:
|
|
211
219
|
|
|
212
220
|
```erb
|
|
@@ -17,15 +17,6 @@ module EffectiveLogging
|
|
|
17
17
|
# No longer need to call this
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
# Sets the before action it immediately
|
|
21
|
-
def self.included(base)
|
|
22
|
-
if base.respond_to?(:before_action)
|
|
23
|
-
base.before_action :set_effective_logging_current_user
|
|
24
|
-
else
|
|
25
|
-
base.before_filter :set_effective_logging_current_user
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
20
|
end
|
|
30
21
|
end
|
|
31
22
|
end
|