effective_trash 0.4.1 → 0.4.2

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: a74c78184cb3ec900ce2336bd3cc00b2f4db31df0743aae8f0c0e81345cc262e
4
- data.tar.gz: 1e79f5bfacebcda566c36b5f11ce271be53e5f975294fb49babd82e349c98f0a
3
+ metadata.gz: e396467b51605c57556e6709d570c9b842a854e70d4b2a438095ae27c6588ce4
4
+ data.tar.gz: 4564fe2452cb161287809d21da658a66014aa155e0af8a99f069019edf6e8c70
5
5
  SHA512:
6
- metadata.gz: 85d54f6faddf75ef480bd44c6a81c12013aca4ca3f63c81a64f228be7cda2cf8720a6743d2871c0f7d191c70431837ebe07086e3aff5fb0c56f70459219b365b
7
- data.tar.gz: 3bc56877b4ec4abd95d7958aa945375c64ff16463b244514c0fef3dd9c2c2210e46a67c14e2a25921c1ad8871e278972fdfac1e8d87fd9aa0aedfa1966f55ccd
6
+ metadata.gz: 2a96ee36e53a801f9c126e61f63bac62ee9d063017aa870892f56257d80ceb3e4a5ab929694a82a9be86c6f05b09143e7bf0358444062dcb80350d62946bd385
7
+ data.tar.gz: a2f6b828a1c74e64eb2e361fdf33f19a5492c925295f459a21f7c72be839352a379b36291fdf17b7a6ef9516a13e63b96ba29c1678838046bf824d81ac71778c
@@ -3,14 +3,15 @@ module EffectiveTrash
3
3
  module ActionController
4
4
 
5
5
  # Add me to your ApplicationController
6
- # before_action :set_effective_trash_current_user
6
+ # around_action :set_effective_trash_current_user
7
7
 
8
8
  def set_effective_trash_current_user
9
- begin
10
- EffectiveTrash.current_user = current_user
11
- yield
12
- ensure
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
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveTrash
2
- VERSION = '0.4.1'.freeze
2
+ VERSION = '0.4.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_trash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect