effective_resources 2.1.0 → 2.1.2
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5bbe9d2d397b7aa15ce5eac7e06195ea31bed308e6f11e1f3a5b0842228c4a3e
|
|
4
|
+
data.tar.gz: 347ae76d73478afb5130a71a030f293830a2450b567a4ce2cbbd03dd94c90e2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71e9a722f002120691c88aa70ffba6b7892f29c6fc6d3d9f78e894c2ae8a421543a26fa2d77001a95fea0161f7de64cd755d9ea3c78fc78976e48ba1ad36e1d3
|
|
7
|
+
data.tar.gz: 6ec2a9c001636a0274c02d48baf192a0640b1cace67b07a71f7cd6bba7ea1c96ae65d28f62fc8f9bfcfaedc51ad78c5cc3f9815e9bea15fffd9ea8a5c7a2c8c2
|
|
@@ -293,4 +293,12 @@ module EffectiveResourcesHelper
|
|
|
293
293
|
end
|
|
294
294
|
end
|
|
295
295
|
|
|
296
|
+
def return_to_dashboard_path
|
|
297
|
+
path = (Tenant.routes.dashboard_path rescue nil) if defined?(Tenant) && Tenant.routes.respond_to?(:dashboard_path)
|
|
298
|
+
path ||= (main_app.dashboard_path rescue nil) if main_app.respond_to?(:dashboard_path)
|
|
299
|
+
path ||= (main_app.root_path rescue nil) if main_app.respond_to?(:root_path)
|
|
300
|
+
|
|
301
|
+
path || '/'
|
|
302
|
+
end
|
|
303
|
+
|
|
296
304
|
end
|
|
@@ -36,20 +36,20 @@ module EffectiveResourcesPrivateHelper
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
# Replace resource name in any token strings
|
|
39
|
-
if opts
|
|
40
|
-
opts['data-confirm'] = opts['data-confirm'].gsub('@resource'
|
|
39
|
+
if opts.key?('data-confirm') && opts['data-confirm'].to_s.include?('@resource')
|
|
40
|
+
opts['data-confirm'] = opts['data-confirm'].gsub('@resource', resource_to_s)
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
# Assign class
|
|
44
44
|
opts[:class] ||= (
|
|
45
|
-
if opts['data-method'.
|
|
46
|
-
'btn btn-danger'
|
|
45
|
+
if opts['data-method'].to_s == 'delete'
|
|
46
|
+
'btn btn-danger'
|
|
47
47
|
elsif h.length == 0
|
|
48
|
-
'btn btn-primary'
|
|
48
|
+
'btn btn-primary'
|
|
49
49
|
elsif defined?(EffectiveBootstrap)
|
|
50
|
-
'btn btn-secondary'
|
|
50
|
+
'btn btn-secondary'
|
|
51
51
|
else
|
|
52
|
-
'btn btn-default'
|
|
52
|
+
'btn btn-default'
|
|
53
53
|
end
|
|
54
54
|
)
|
|
55
55
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_resources
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.2
|
|
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: 2022-
|
|
11
|
+
date: 2022-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|