effective_trash 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/effective_trash/engine.rb +2 -0
- data/lib/effective_trash/set_current_user.rb +6 -5
- data/lib/effective_trash/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a027f4ee4322f2cf88f285940118622d0e388152bcc5dd05e496d58ac8accc5e
|
4
|
+
data.tar.gz: 69473545481c7a68bb9f38055af0b911b94a5d307215c64a561d2b80913a31bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 884dc5138ad6decd88bf97d70f12d58d5f0bdd0fc32cbebbfc49ec3240e485bd12f454e8ddd42e9eb9323389f6b77bd0fa17db0e185990d8b3bf0d63c1500dec
|
7
|
+
data.tar.gz: dd6b3e43126f70b9a2cde51b36fbb923d2690b30492bdd511f6ede8ad58c7437231c822bcbaa96562113a7f11b28a2231c9b01ccec64ad31361124e1b75eb317
|
@@ -3,14 +3,15 @@ module EffectiveTrash
|
|
3
3
|
module ActionController
|
4
4
|
|
5
5
|
# Add me to your ApplicationController
|
6
|
-
#
|
6
|
+
# around_action :set_effective_trash_current_user
|
7
7
|
|
8
8
|
def set_effective_trash_current_user
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
EffectiveTrash.current_user = current_user
|
10
|
+
|
11
|
+
if block_given?
|
12
|
+
retval = yield
|
13
13
|
EffectiveTrash.current_user = nil
|
14
|
+
retval
|
14
15
|
end
|
15
16
|
end
|
16
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_trash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
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: 2023-
|
11
|
+
date: 2023-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
|
-
rubygems_version: 3.
|
119
|
+
rubygems_version: 3.4.10
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Trash and Restore any Active Record object.
|