effective_resources 2.31.3 → 2.33.0
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: 6f5a25c6d8a3d00de7fc80b70dacf4558f2c0dc8241294ce276f6d31eda10a21
|
|
4
|
+
data.tar.gz: a7edbeb23f0ae8a5f772227c25fd8febe75d8b277440c3f10b4de42575c85a61
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f44f4d9b43f1cfd93d567d3ed1ea12f68696acb2dbb328a07fa811eef0de797259912f936de1d016b333179baac47c22ec4773be3667245ea0b1bb0516bb3d9
|
|
7
|
+
data.tar.gz: 56d5924d9b63fb7b51be6b47eeb178a8ab6bb7eae501083b1e6077bb2145867750351a5233d6ff01e9ecbd8ebbcd9a80afb196aac0769d0c9e145960d3de659b
|
|
@@ -36,7 +36,7 @@ module Effective
|
|
|
36
36
|
# submit :save, 'Save', success: -> { "#{resource} was saved okay!" }
|
|
37
37
|
def submit(action, label, args = {})
|
|
38
38
|
instance_exec do
|
|
39
|
-
|
|
39
|
+
prepend_before_action { _insert_submit(action, label, args) }
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -49,7 +49,7 @@ module Effective
|
|
|
49
49
|
# button :decline, false
|
|
50
50
|
def button(action, label = nil, args = {})
|
|
51
51
|
instance_exec do
|
|
52
|
-
|
|
52
|
+
prepend_before_action { _insert_button(action, label, args) }
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -57,7 +57,7 @@ module Effective
|
|
|
57
57
|
# submit and buttons options will be merged ontop of these
|
|
58
58
|
def on(action, args = {})
|
|
59
59
|
instance_exec do
|
|
60
|
-
|
|
60
|
+
prepend_before_action { _insert_on(action, args) }
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
@@ -29,7 +29,8 @@ module Effective
|
|
|
29
29
|
# before_action :authorize_resource, only: [:show, :update]
|
|
30
30
|
# Authorize the resource
|
|
31
31
|
def authorize_resource
|
|
32
|
-
|
|
32
|
+
action = (commit_action[:action] == :save ? action_name : commit_action[:action]).to_sym
|
|
33
|
+
EffectiveResources.authorize!(self, action, resource)
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
# before_action :assign_required_steps, only: [:show, :update]
|
|
@@ -26,6 +26,14 @@ module EffectiveMailer
|
|
|
26
26
|
resource.respond_to?(:log_changes_datatable) ? opts.merge(log: resource) : opts
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
+
def link_to(label, url = nil, opts = {})
|
|
30
|
+
if label.present? && url.present?
|
|
31
|
+
view_context.link_to(label, url, opts).html_safe
|
|
32
|
+
else
|
|
33
|
+
view_context.link_to(label, label, opts).html_safe
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
29
37
|
private
|
|
30
38
|
|
|
31
39
|
# This returns the top level gem, EffectiveOrders or EffectiveResources
|
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.
|
|
4
|
+
version: 2.33.0
|
|
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: 2025-
|
|
11
|
+
date: 2025-11-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|