active_admin_versioning 0.2.3 → 0.3.0

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
  SHA1:
3
- metadata.gz: a44bb3b38485cae88b9df2abe0d38a1f8f3f6312
4
- data.tar.gz: a59b1323fc1339d8943e8596f19747a306c0ed08
3
+ metadata.gz: 9769fbd39b793ac165035be6dfaedf8858fca59e
4
+ data.tar.gz: 5959c46404b433f2bc4071dc824a07f2fcc84bb1
5
5
  SHA512:
6
- metadata.gz: 25cd6255294df5e1d00d28579f4b504cfa8fb23f4265817d3bec99e258fe8bf298a20bb358db2a0a76b6a0bc0480cc106b517c7dc17acbdbb35da13de0ea3677
7
- data.tar.gz: a5aa6552e56c43329333e671d8d6cb7c10f58c8a1c67f7f0eb8a076f2cbab8df297e4c3b983681bda9bf43014ccba0ec740e780938e3321b114277c98e038ec5
6
+ metadata.gz: 114671d040199015d3d1934a2e17d0fda979c636963082f08ee15b4de6ca65573a9a8fe3af008196f942b8cd32bbec8c85f8b5fa6643d76e96501cba2b4fb341
7
+ data.tar.gz: f7c81e8126a010030c2a484366d7a2223cdaa80d44cc350bf9efb72ece37d9145c6c4e2f089cf86c326c1400e7f4ed6b062b3b2874fc2172c0992ec5c4521af7
@@ -18,7 +18,17 @@ module ActiveAdminVersioning
18
18
  protected
19
19
 
20
20
  def user_for_paper_trail
21
- respond_to?(:current_admin_user) ? current_admin_user.id : t("views.version.unknown_user")
21
+ if current_user_method && respond_to?(current_user_method)
22
+ public_send(current_user_method).try!(:id)
23
+ else
24
+ t("views.version.unknown_user")
25
+ end
26
+ end
27
+
28
+ private
29
+
30
+ def current_user_method
31
+ @_current_user_method ||= active_admin_namespace.current_user_method
22
32
  end
23
33
  end
24
34
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminVersioning
2
- VERSION = "0.2.3".freeze
2
+ VERSION = "0.3.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_admin_versioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshiyuki Hirano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-13 00:00:00.000000000 Z
11
+ date: 2017-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin