active_entry 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/active_entry/view_helper.rb +2 -2
- data/lib/active_entry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68c5d6e98c46a35b4ef4e32f6987bd0c412326aad17db589e45dd671a6d3e1b7
|
4
|
+
data.tar.gz: 48d4b700fdff06bd94ab4fc2b9d34c73142b21a91641be20fd080287f11c16f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4efc966d6cc59cf94da405cdd583afb3e3954ed73dbb97b9c83876cd04ffe5965e7d67850b903318acbf9af342ea0933c837b65773bf74deb7c8664c0e58d3ff
|
7
|
+
data.tar.gz: ac48a14a4a6b0761b3d35516caa11254c8b637dda53498b6b603d16ba1b800e5d09e44af8383ea9141777907288381648b0b39db033f55db84899e1e671e084f
|
@@ -6,13 +6,13 @@ module ActiveEntry
|
|
6
6
|
policy::Authorization.pass? action, **args
|
7
7
|
end
|
8
8
|
|
9
|
-
def link_to_if_authorized name = nil, options = nil, html_options = nil, &block
|
9
|
+
def link_to_if_authorized name = nil, options = nil, html_options = nil, **args, &block
|
10
10
|
url = url_for options
|
11
11
|
method = options&.is_a?(Hash) && options[:method] ? options[:method].to_s.upcase : "GET"
|
12
12
|
|
13
13
|
recognized_path = Rails.application.routes.recognize_path(url, method: method)
|
14
14
|
|
15
|
-
authorized = authorized_for? recognized_path[:controller], recognized_path[:action]
|
15
|
+
authorized = authorized_for? recognized_path[:controller], recognized_path[:action], **args
|
16
16
|
|
17
17
|
link_to name, options, html_options, &block if authorized
|
18
18
|
end
|
data/lib/active_entry/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_entry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TFM Agency GmbH
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-04-
|
12
|
+
date: 2021-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|